Open
Description
Describe the bug
Setting the value of a Select component at the same time the Options are updated causes the Select component's value to change once, and then change again to undefined
To Reproduce
(See REPL here: https://svelte.dev/repl/7e74d75b52a84e09b4ad7aff4342ddf3?version=3.53.1)
- Select a value from the first Select. This will change the Options in the 2nd Select
- Watch console and you will see the value of the 2nd Select value change once and then change again to undefined
Expected behavior
Expect the value to get set and keep it. The expected behavior can be seen in the same REPL using the basic select element
Screenshots
(See REPL here: https://svelte.dev/repl/7e74d75b52a84e09b4ad7aff4342ddf3?version=3.53.1)
Activity
nbaillie commentedon Apr 16, 2023
I something simalar but when change the options and value i see the second value set in console log corectly but the selector visually does not update (if i click on the selector i can see the correct value is selected then, but whern i click away it dose not show in the ui).. and when i change back to native select and options it works correctly.
Any ideas on workarounds?
fix: dynamically setting options sets undefined to select value