Radio group "A component is changing an uncontrolled input to be controlled." #8462
Unanswered
borachoidev
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Please provide a sandbox with a minimal reproduction |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using Mantine’s useForm like this:
And I’m getting two console errors:
A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components
This happens on the radio button whose value matches the initial value
A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components
This happens on the radio button whose value matches the fetched value.
When I try to change the value to “A”, the radio button doesn’t detect the change. If I select another option first and then choose “A” again, it finally works.
I don't know which part is wrong.
my mantine version is 8.1.2.
Beta Was this translation helpful? Give feedback.
All reactions