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
Svelte 5: <select> options with object references. #11403
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Consider the following:
The select element will not correctly display
options[0]
as being selected. This is likely due to an identity-check being used against aProxy
in Svelte internals.To workaround this, wrap the
options
array in a$state
rune. Using$state.frozen
will not work.I'm not sure if this is intended behaviour. If so, perhaps we should document this edge case with the workaround.
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE21Ou2rEMBD8lWWTIgET59EJ2ZB_SGe5UOQ9ItBJwlofF4z-PchSrkm6eezszI4n6yihmHb0-kwo8D1G7JC_YyHpQo4JO0xhW01RZDKrjTwqb4JPDCGyDT7BAJPyinemKwtQ-EFXhheFufsrv_4vv1V5Vl55RwyJHBmmBQa4T6yZHlrZ9Dw_Ki_72xRZT-HT-kVctNto2H_TeTya7kibr9tanRrMxVQsK4OWbd7YwFOZmWVfWf3Xl3_5WHEUjdjhOSz2ZGlBwetGec4_GI8Ytl8BAAA=
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: