Material-ui: FormControlLabel on Checkbox not working as expected with React Concurrent Mode

Created on 19 Jun 2020  路  2Comments  路  Source: mui-org/material-ui

  • [ ] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸


It needs double click on the label of a Checkbox to change its value.

Expected Behavior 馃

To be the same as clicking on the checkbox itself: one click to toggle the value.

Steps to Reproduce 馃暪


https://codesandbox.io/s/material-ui-checkbox-on-react-concurrent-mode-t6i83

Steps:

  1. try clicking once on the Material UI's Checkbox label

Context 馃敠


Enable the React concurrent mode using React and React-Dom v0.0.0-experimental-d7382b6c4.

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.6.1 |
| React | v0.0.0-experimental-d7382b6c4 |
| Browser | Chrome Version 83.0.4103.106 (Official Build) (64-bit) |
| TypeScript | - |

bug 馃悰

Most helpful comment

React Concurrent mode is going to ruin our lives

All 2 comments

Things I have observed:

Works for touch e.g. on iPhone
Works without FormControl
Works with an uncontrolled checkbox.

https://codesandbox.io/s/material-ui-checkbox-on-react-concurrent-mode-gbcv9

React Concurrent mode is going to ruin our lives

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anthony-dandrea picture anthony-dandrea  路  3Comments

reflog picture reflog  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

ghost picture ghost  路  3Comments