mui icon indicating copy to clipboard operation
mui copied to clipboard

[FormControlLable] fails to render with Checkbox control

Open JESii opened this issue 7 years ago • 1 comments

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 avatar Nov 01 '18 20:11 JESii

@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

amorey avatar Nov 02 '18 06:11 amorey