question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CheckboxGroup] Numeric values don't work in uncontrolled mode

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
segunadebayocommented, Oct 20, 2019

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.

1reaction
segunadebayocommented, Dec 2, 2019

This has been resolved in the dev-ts branch and will be released soon. I’ll close it out for now

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found