iulianraduat / react-select-material-ui

A react SELECT component based on react-select and looking like a material-ui component
MIT License
73 stars 18 forks source link

z-index issues with latest material-ui and FormControl #28

Closed mbyrne00 closed 4 years ago

mbyrne00 commented 4 years ago

Hi - material-ui have set a z-index: 0 on FormControl by default with their latest update. I raised an issue with them to state that it will break components like this one: https://github.com/mui-org/material-ui/issues/19677

If they decide not to fix it this library could add style={{ zIndex: 1 }} or even style={{ zIndex: 'unset' }} to the FormComponent it renders to avoid issues where the dropdown appears behind checkboxes.

My workaround is to do this from my calling component for now.

oliviertassinari commented 4 years ago

Note the introduction of the Autocomplete component in the lab.

mbyrne00 commented 4 years ago

That looks promising @oliviertassinari - I'll take a look at that for new components and see if we can swap over. Thanks.

iulianraduat commented 4 years ago

Hi @mbyrne00,

I added to storybook your issue and it works correctly there. Please check the code of the storybook for issue#28 and in case your code is "different" than this and the problem is still reproducible by you with the latest version of react-select-material-ui please send me a code which should reproduce it in storybook.

Thanks, Iulian

oliviertassinari commented 4 years ago

The issue should have been fixed upstream now.

iulianraduat commented 4 years ago

Thanks @oliviertassinari.

Then I will close this issue.

Cheers, Iulian