Skip to content

Commit

Permalink
Merge pull request #732 from gayanSandamal/LAN-715
Browse files Browse the repository at this point in the history
LAN-715 - set default value when the value is required and exceeded the min max values
  • Loading branch information
amilaw authored Aug 11, 2023
2 parents fac8935 + b4049b3 commit 4e8cbb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/src/core/components/Input/Number/Number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default defineComponent({
number.value = Number(value);
if (!(number.value === undefined || number.value === null)) {
if (number.value <= props.min) {
number.value = props.min;
number.value = props.defaultValue || 0;
}
if (number.value >= props.max) {
number.value = props.max;
number.value = props.defaultValue || 0;
}
}
} else {
Expand Down

0 comments on commit 4e8cbb3

Please sign in to comment.