mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
Put the ref
reactive with other reactive.
This commit is contained in:
parent
faddb4c654
commit
1bcb4ac9eb
1 changed files with 1 additions and 2 deletions
|
@ -133,6 +133,7 @@
|
||||||
$: ariaLabel =
|
$: ariaLabel =
|
||||||
$$props["aria-label"] ||
|
$$props["aria-label"] ||
|
||||||
"Numeric input field with increment and decrement buttons";
|
"Numeric input field with increment and decrement buttons";
|
||||||
|
$: if (ref) ref.setCustomValidity(invalid ? invalidText : "");
|
||||||
|
|
||||||
function parse(raw) {
|
function parse(raw) {
|
||||||
return raw != "" ? Number(raw) : null;
|
return raw != "" ? Number(raw) : null;
|
||||||
|
@ -154,8 +155,6 @@
|
||||||
dispatch("change", parse(target.value));
|
dispatch("change", parse(target.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if (ref) ref.setCustomValidity(invalid ? invalidText : "");
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
error = getValidity();
|
error = getValidity();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue