Skip to content
Discussion options

You must be logged in to vote

The issue is that DataListCheck doesn't handle uncontrolled checkboxes, and examples of are not fully wired up to handle checkbox events. You would need track the checked state in the app state, pass that to checked on DataListCheck as well as pass an event handler to onChange to toggle the checked state.

<DataListCheck checked={isCheckedState} onChange={onChangeHandler} aria-labelledby="check-action-item1" name="check-action-check1" />

There is a PR open for DataList targeting the next major version (v6) that will resolve the issue with uncontrolled checkboxes not functioning, so the behavior will work by default and you won't need to wire up the example.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kmcfaul
Comment options

Answer selected by nicolethoen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants