Skip to content

Commit

Permalink
Merge pull request #134 from silinternational/develop
Browse files Browse the repository at this point in the history
fix(MoneyInput): fix step bug when 2.01 is entered
  • Loading branch information
hobbitronics authored Mar 4, 2022
2 parents 9692e65 + 10b8f9c commit 1209a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/mdc/TextInput/MoneyInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $: isLowerThanMinValue = minValue && internalValue < minValue
$: showErrorIcon = hasExceededMaxValue || isLowerThanMinValue || hasExceededMaxLength || valueNotDivisibleByStep
$: error = showErrorIcon || (hasFocused && hasBlurred && required && !internalValue)
$: showCounter = maxlength && valueLength / maxlength > 0.85
$: valueNotDivisibleByStep = internalValue && (internalValue / Number(step)) % 1 !== 0
$: valueNotDivisibleByStep = internalValue && (internalValue / Number(step)).toFixed(13) % 1 !== 0
$: internalValue = Number(value) || 0
onMount(() => {
Expand Down

0 comments on commit 1209a37

Please sign in to comment.