New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to material ui icons v5 broke react-select #4979
Comments
Hello @charneykaye,
You should wrap const DropdownIndicator = (props) => (<components.DropdownIndicator {...props}>
<SearchIcon />
</components.DropdownIndicator>);
<Select
components={{
DropdownIndicator
}}
/> |
@Rall3n great catch on that interaction between the To clarify, what is the source of It turns out, your fix does work, simply with: const DropdownIndicator = (props) => (<div {...props}><SearchIcon /></div>); Anyway, you nailed it. Go take credit with the correct answer on stack overflow :) |
You should not directly spread But I still recommend using |
Thanks @Rall3n I will take your suggestion. I did not understand where |
I have been upgrading from
@material-ui/icons
4.11.2 to@mui/icons-material
at 5.2.3I realize that material UI is not directly used in react-select however as far as I can see there is some interaction.
The upgrade from Material UI Icons v4 to v5 seemed to be going fine. But then, I noticed all the react-select dropdowns explode the application (instant blank screen) with this error in the console:
I've been pouring over the Material UI v4 -> v5 migration guide, have upgraded our
react
andreact-dom
libraries to 17.0.2 andreact-select
library to 5.2.1, but this issue persists.Here's my function component that wraps all the dropdown selectors in question.
Also posted this question on StackOverflow
The text was updated successfully, but these errors were encountered: