Material-ui: Checkbox: "onCheck" does not work with React 15.6

Created on 27 Jun 2017  路  12Comments  路  Source: mui-org/material-ui

I don't receive any call to onCheck in react >= 15.6.0

bug 馃悰 Checkbox

Most helpful comment

It seems to work with onClick instead of onCheck. I don't know if it's intentional / reliable.

All 12 comments

Any idea what's going one?

Not really, but if I get the input element in the Chrome console and I perform a click() it will work.

Same issue happens to the Toggler.

I've also upgraded to 15.6 and all my checkboxes and radio buttons work as usual.

<Checkbox style={{marginBottom: '16px'}} label="Check me!" onCheck={(event, value) => handleCheck(value)} />

handleCheck is called as usual...
using React 15.6.1 and material-ui 0.18.6

15.6.1 has been released a long time ago, given the few number of feedback we have, I'm assuming that the issue is somewhere else. Last time we had a react upgrade related issue, we had a storm of feedback. I'm closing. Let us know if you find something about it, or even better submit a PR

I have the same issue but it only presents itself on Linux while using "onCheck" and "value" properties. As a work around I moved to "onCheck" and "defaultChecked" properties which seems to work fine as a controlled input. Any clues on how should I address this behaviour? Perhaps I could send a PR.

using React 15.6.1 and material-ui 0.18.2+

So, I'm able to reproduce it:

bug happens if you try to use onToggle and at same time the toogled property.

Checkbox the same if you both use checked and onCheck property.

Can we pls reopen this ?

Thanks for the merge, can we have please a fix release since this affect all the controlled switchers with react >= 15.6 ?

The last release was yesterday. I want to wait for potential regressions before publishing a new one. I think that it will be done before the end of the week.

I have this issue again with material-ui 0.20.0 and react 16.2 (mac/chrome)
When I use checked and onCheck together for a <Checkbox/> then onCheck simply doesn't fire.

I remember I had this problem early July of 2017 but then the updating to the newest packages solved the problem.

I confirm @g-borgulya case for the material 0.20.0 and react 16.2 (mac/chrome and linux/chrome)

It seems to work with onClick instead of onCheck. I don't know if it's intentional / reliable.

It seems I have the same issue with RadioButtonGroup, onChange doesn't fire anything

Was this page helpful?
0 / 5 - 0 ratings