mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(number-input): value 0
should not be converted to null
(#1046)
This commit is contained in:
parent
6154e8ba05
commit
402de56029
2 changed files with 16 additions and 12 deletions
|
@ -135,7 +135,7 @@
|
|||
$: dispatch("change", value);
|
||||
$: incrementLabel = translateWithId("increment");
|
||||
$: decrementLabel = translateWithId("decrement");
|
||||
$: value = inputValue ? Number(inputValue) : null;
|
||||
$: value = inputValue != null ? Number(inputValue) : null;
|
||||
$: error =
|
||||
invalid || (!allowEmpty && value == null) || value > max || value < min;
|
||||
$: errorId = `error-${id}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue