react-native-material-ui icon indicating copy to clipboard operation
react-native-material-ui copied to clipboard

No callback occurs when checkbox pressed and No label rendered

Open antTony00 opened this issue 5 years ago • 3 comments

this is my implementation,

<Checkbox
          label="Remember Me"
          checked={this.state.checked}
          disabled={false}
          onCheck={checked => {
            this.setState({checked});
          }}
        />

antTony00 avatar Mar 19 '19 11:03 antTony00

Hey @ant-tony-antony I couldn't reproduce your error. Just copied the same code you posted and the onCheck worked fine. Could you provide more details about it?

moiseshilario avatar Apr 05 '19 21:04 moiseshilario

I am having the exact same issue. Copying and pasting your code into a completely unstyled empty react component I have the same outcome; no label, and no events on change. Versions: "react-native": "~0.62.2", "react-native-material-ui": "^1.30.1"

Using TypeScript

kmarkiewicz avatar Aug 20 '20 22:08 kmarkiewicz

I got it working. I played around with the styles on the parent view component and it seems you must have the "flex" property set to a value greater than 0. Try setting "flex: 1" on a parent View component.

kmarkiewicz avatar Aug 20 '20 22:08 kmarkiewicz