carbon-components-svelte
carbon-components-svelte copied to clipboard
Input validation issue on TextInput component
See REPL here : https://svelte.dev/repl/a122d2d5e47345099c0bb4a1712e5130?version=3.44.3
When erasing the input content (one character at a time), it's filled again with the original content
Interesting, but I'm unable to repro in a non-REPL setting.
Exporting value in Input.svelte seems to fix it though: https://svelte.dev/repl/ff0ba6fcbc0347afb7695e8843d9831b?version=3.44.3
Interesting indeed... I guess we can close this then. I spent half na hour trying to find the issue inside the TextInput component... Guess it was my mistake. I would be really interested in an explanation though if someone knows why this is happening.
I would also be interested in an explanation. It seems that there is some reactivity issue where the value="test" prop passed down using $$restProps clashes with the bind:value in the input component.
I've created another REPL that produces the same behavior when using a plain input: https://svelte.dev/repl/c58a66f954304c538e0ca02120e84b98?version=3.44.3
Whenever I try any of the REPL links above, it gives me this error:
Unexpected character '@' (TreeViewNodeList.svelte:80:3)
I tried Firefox and a Chromium browser and both had the same error. Does anyone know what that's about?