Skip to content
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

Switch primitive doesn't reset on form reset #3177

Open
LutherTS opened this issue Oct 13, 2024 · 0 comments
Open

Switch primitive doesn't reset on form reset #3177

LutherTS opened this issue Oct 13, 2024 · 0 comments

Comments

@LutherTS
Copy link

LutherTS commented Oct 13, 2024

Just noticing that the Switch primitive doesn't reset on form reset when uncontrolled. One workaround is to control the primitive, but a better one in my opinion is to use a state as a key on the primitive and to set the state to a new (random) value in an handler or an action onReset on the form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant