[CheckboxGroup] Numeric values don't work in uncontrolled mode
See original GitHub issueWhen a CheckboxGroup
is not controlled, giving numeric value
props to children breaks the isChecked
mechanism, as _values
, matching the value of the values
state variable, can only be an array of strings, set through _onChange
.
I suggest deprecating support for numeric form Checkbox
and Radio
values, as they do more harm than the convenience they provide.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
React Hook Forms + Material UI Checkboxes - Stack Overflow
I managed to make it work without using Controller. The props should be inside the FormControlLabel and not inside Checkbox
Read more >Uncontrolled Components - React
To write an uncontrolled component, instead of writing an event handler for every state update, you can use a ref to get form...
Read more >Checkbox Group | Retool Component Library
Reference documentation for Retool's Checkbox Group component. Includes examples and information about available properties, methods, and events.
Read more >Checkbox - Chakra UI
Checkbox component is used in forms when a user needs to select multiple values from several options.
Read more >Checkbox | Components | Vaadin Docs
Checkbox is an input field representing a binary choice. ... Disabled state is used for fields that aren't editable and don't need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I’ll look into it. We’re currently looking to migrate Chakra to TS to resolve most of the type issues. I’ll ensure we resolve this when we work on the
CheckboxGroup
.This has been resolved in the
dev-ts
branch and will be released soon. I’ll close it out for now