Skip to content

Commit

Permalink
fix(MoneyInput): fix MoneyInput staying red
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Dec 21, 2021
1 parent 93fd61c commit 2adc91c
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 @@ -29,7 +29,7 @@ $: hasExceededMaxLength = maxlength && valueLength > maxlength
$: hasExceededMaxValue = maxValue && internalValue > maxValue
$: isLowerThanMinValue = minValue && internalValue < minValue
$: showErrorIcon = hasExceededMaxValue || isLowerThanMinValue || hasExceededMaxLength || valueNotDivisibleByStep
$: error = showErrorIcon || (hasFocused && hasBlurred && required && !value)
$: error = showErrorIcon || (hasFocused && hasBlurred && required && !internalValue)
$: showCounter = maxlength && valueLength / maxlength > 0.85
$: valueNotDivisibleByStep = internalValue && (internalValue / Number(step)) % 1 !== 0
$: internalValue = Number(value) || ''
Expand Down

0 comments on commit 2adc91c

Please sign in to comment.