-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Autocomplete] Fix crash with freeSolo and rich options #18161
Conversation
Details of bundle changes.Comparing: 3e25d1b...bb8de22
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this.
Please take a look at the log of the failed builds to find out what went wrong. For more information see https://github.com/mui-org/material-ui/blob/master/CONTRIBUTING.md#checks-and-how-to-fix-them
@oziniak I had a closer look at the issue, I'm sorry. I think that I have led you in the wrong direction. In your use case, you mix rich options with plain string options. You have to account for it in the getOptionLabel method. I will update the pull request to raise a warning instead of crashing. A proper <Autocomplete
getOptionLabel={option => (typeof option === 'string' ? option : option.name)}
/> |
Closes #18123