-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[Autocomplete] Add ability to render custom single value #45387
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] Add ability to render custom single value #45387
Conversation
Netlify deploy preview@material-ui/core: parsed: +0.08% , gzip: +0.10% Bundle size reportDetails of bundle changes (Toolpad) |
@aarongarciah @DiegoAndai @michaldudak I’ve made the discussed changes:
Ready for further review. |
Just a heads-up, this is ready for further review. |
The preview looks good @ZeeshanTamboli 🙌🏼
A question about this, could we modify |
Yes, we can. Done! 👍 Please review carefully. There should be no breaking changes. Since Regarding the
To maintain backward compatibility with |
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.
LGTM in general.
Closes #26440
Based on the upvotes and requests in #26440, this PR introduces a newrenderSingleValue
prop to customize the display of the selected value. This is separate fromrenderTags
for clarity. I avoided naming itrenderTag
to prevent potential confusion and typos.Edit: Decided to go with
renderValue
as the prop name based on the discussion below. Also deprecatedrenderTags
prop.Preview: https://deploy-preview-45387--material-ui.netlify.app/material-ui/react-autocomplete/#custom-single-value-rendering