-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Radio/checkbox input with bind:group and spread props makes variable undefined #3680
Comments
I think this may be a (slightly more convoluted) manifestation of the same issue as #3764. The presence of the spread is preventing the attributes from being set the way they normally would - which in this case includes the special |
#3764 has been fixed, but, as I noted in a comment there, this is actually a slightly different issue. In situations like this with indirectly bound values, we need to always set the custom cc @mrkishi |
This now works in 3.19.0. Note that the checkboxes still have a different problem (because of the duplicated values), which is documented in #4397, and which I'm not sure how we want to handle. |
Describe the bug
When using an input (
type="radio"
ortype="checkbox"
) withbind:group
in combination with spread properties, it sets the bound variable to undefined when clicked.To Reproduce
https://svelte.dev/repl/eded09217d054d5cb518712f08833437?version=3.12.1
Severity
Semi-minor inconvenience. Having to specify each prop now instead of using a spread. And not being able to share props easily.
The text was updated successfully, but these errors were encountered: