-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
value for keyed select tag doesn't work when options are updated #5641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe this is because the option is not available in the select element when it's set. And also, would adding a option with the attribute |
Would this work?
|
This works for
This works, as I pointed the same workaround in the issue itself. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
The selected value is known oncreate, but the values are added later. The selected value isn't set when they are added.
This problem is like #1764 but for
value
instead ofbind:value
.To Reproduce
https://svelte.dev/repl/63a13fa5f6e2425a970824691919b87f?version=3.29.4
You will see
three
on the select elementExpected behavior
You should see
two
on the select elementSeverity
This is annoying but there is a workaround described on #1764 (comment)
The text was updated successfully, but these errors were encountered: