Put the refreactive with other reactive.

This commit is contained in:
jqlio18 2022-12-13 17:46:56 -05:00
commit 1bcb4ac9eb

View file

@ -133,6 +133,7 @@
$: ariaLabel =
$$props["aria-label"] ||
"Numeric input field with increment and decrement buttons";
$: if (ref) ref.setCustomValidity(invalid ? invalidText : "");
function parse(raw) {
return raw != "" ? Number(raw) : null;
@ -154,8 +155,6 @@
dispatch("change", parse(target.value));
}
$: if (ref) ref.setCustomValidity(invalid ? invalidText : "");
onMount(() => {
error = getValidity();
});