Home > database >  Issue related with material-ui Autocomplete control with checkboxes
Issue related with material-ui Autocomplete control with checkboxes

Time:12-22

I have Autocomplete control with checkboxes. In this link there is demo, https://codesandbox.io/s/brave-wozniak-hu2l45?file=/src/inner.js Currently checkboxes are not checkable, but when we change line 84 as

   - options={options2}
     options={options}

it works, or when we comment line 88

//setSelectedValues(val);

it also works. What can be the problem? Any ideas? Thanks.

CodePudding user response:

You just need to remove your const variable(options2) outside your functional component just after all imports at line 9. It will work.

  • Related