Skip to content

[autocomplete] Fix label shrink issue when renderValue is used with empty array in multiple mode - #46047

Merged
ZeeshanTamboli merged 4 commits into
mui:masterfrom
ZeeshanTamboli:issue-46037-label-shrunk-autocomplete
May 20, 2025
Merged

[autocomplete] Fix label shrink issue when renderValue is used with empty array in multiple mode#46047
ZeeshanTamboli merged 4 commits into
mui:masterfrom
ZeeshanTamboli:issue-46037-label-shrunk-autocomplete

Conversation

@ZeeshanTamboli

@ZeeshanTamboli ZeeshanTamboli commented Apr 30, 2025

Copy link
Copy Markdown
Member

Fixes #46037

Regression from #45387

We didn’t skip rendering startAdornment, which caused the label to shrink when value is empty in multiple mode with a custom renderValue.

Before: https://codesandbox.io/p/sandbox/stupefied-snowflake-wsw376
After: https://codesandbox.io/p/devbox/hidden-haze-f3rzz7

@ZeeshanTamboli ZeeshanTamboli added type: bug It doesn't behave as expected. scope: autocomplete Changes related to the autocomplete. This includes ComboBox. type: regression A bug, but worse, it used to behave as expected. labels Apr 30, 2025
@mui-bot

mui-bot commented Apr 30, 2025

Copy link
Copy Markdown

Netlify deploy preview

https://deploy-preview-46047--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 7c84a1c

@ZeeshanTamboli

Copy link
Copy Markdown
Member Author

Can this be reviewed? I'd like to have it included in the upcoming release since it's a regression.

@ZeeshanTamboli
ZeeshanTamboli requested a review from DiegoAndai May 6, 2025 06:16
@ZeeshanTamboli

Copy link
Copy Markdown
Member Author

Any review on this?

@ZeeshanTamboli
ZeeshanTamboli requested a review from sai6855 May 19, 2025 13:06
@ZeeshanTamboli
ZeeshanTamboli merged commit 2043d80 into mui:master May 20, 2025
@ZeeshanTamboli
ZeeshanTamboli deleted the issue-46037-label-shrunk-autocomplete branch May 20, 2025 12:55

@DiegoAndai DiegoAndai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in the review @ZeeshanTamboli, I was on vacation. I'm back now.

@oliviertassinari oliviertassinari changed the title [Autocomplete] Fix label shrink issue when renderValue is used with empty array in multiple mode [autocomplete] Fix label shrink issue when renderValue is used with empty array in multiple mode Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: autocomplete Changes related to the autocomplete. This includes ComboBox. type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[autocomplete] Label is shrinked when providing an empty array as a value to Autocomplete when using multiple and renderValue

5 participants