mui
mui copied to clipboard
[FormControlLable] fails to render with Checkbox control
I'm working with "@material-ui/core": "^1.5.1" and "react": "^16.2.0". Since I am unable to get a Checkbox to render with a label (see issue #292 ), I decided to try the FormControlLabel.
When I render the following:
...
return (
<FormControlLabel
control={this.renderRetryControl()}
label="Select retry option."
/>
);
...
renderRetryControl() {
return (
<Checkbox
id="retry"
name='retry'
checked={true}
/>
)
}
All I get is a blank screen, indicating that this somehow failed to render. I've also tried it with a more straight-forward approach, like so:
return (
<FormControlLabel
control={
<Checkbox
id="retry"
name='retry'
checked={true}
/>
}
label="Select retry option."
/>
);
with the same results.
@JESii Are you using MUI or material-ui? Here's my response to your other issue: https://github.com/muicss/mui/issues/292#issuecomment-435288480