You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
7.8.0
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Typing for "value" in Radio.Group is string | undefined, but to be able to clear value through an external element the value must be set to null.
I assume that setting the value to undefined changes the component from controlled to uncontrolled, and keeps the current state internally somehow
If possible, include a link to a codesandbox with a minimal reproduction
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.8.0
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Typing for "value" in Radio.Group is string | undefined, but to be able to clear value through an external element the value must be set to null.
I assume that setting the value to undefined changes the component from controlled to uncontrolled, and keeps the current state internally somehow
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-react-template-forked-j8ykns?file=%2Fsrc%2FApp.tsx%3A24%2C72
Possible fix
Easiest fix could be to add null as an option in the types declaration for "value" prop so it does not need to be casted in typescript?
This would make developers more certain that null can be used as a valid value in a radio button group to signal a non-selected, yet controlled value.
Self-service
The text was updated successfully, but these errors were encountered: