We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The syntax for bind:group is different from the syntax for bind:value with a get, set tuple for no apparent reason...?
bind:group
bind:value
For the bind:group case you need to create a facade object which get/sets a name:
<script> let val = $state("2"); const facade = { get val() { return val; }, set val(v) { val = v; }, }; </script> <label><input type="radio" value="1" bind:group={facade.val}> one</label> <label><input type="radio" value="2" bind:group={facade.val}> two</label> <input bind:value={() => val, v => val = v}>
It would be great if bind:group={() => val, v = > val = v} would work the same way as it does for bind: value.
bind:group={() => val, v = > val = v}
bind: value
It would be even better if the tuple could be passed as a value, i.e. without being destructured:
<input type="radio" bind:group={form_context.get_accessor('name')} ...>
nice to have
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the problem
The syntax for
bind:group
is different from the syntax forbind:value
with a get, set tuple for no apparent reason...?For the
bind:group
case you need to create a facade object which get/sets a name:Describe the proposed solution
It would be great if
bind:group={() => val, v = > val = v}
would work the same way as it does forbind: value
.It would be even better if the tuple could be passed as a value, i.e. without being destructured:
Importance
nice to have
The text was updated successfully, but these errors were encountered: