Skip to content

Conversation

dangkhoa99
Copy link

@dangkhoa99 dangkhoa99 commented Sep 27, 2025

I've chosen to forward the size prop directly from Autocomplete to its renderInput function. This addresses an issue where the TextField's default size setting (e.g., small) was being incorrectly inherited by renderInput. Direct prop passing guarantees that the intended Autocomplete size is correctly rendered, ensuring style consistency.

@dangkhoa99 dangkhoa99 changed the title adjust: pass size to renderInput [Autocomplete] adjust pass size to renderInput Sep 27, 2025
@mui-bot
Copy link

mui-bot commented Sep 27, 2025

Netlify deploy preview

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

Bundle size report

Bundle Parsed size Gzip size
@mui/material ▼-25B(0.00%) ▼-11B(-0.01%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 2adbc4f

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

@dangkhoa99 Before changing this we should find a reason as to why only small size is supported for TextField in the Autocomplete component. Perhaps we should git blame to find the reason behind this..

@dangkhoa99
Copy link
Author

@dangkhoa99 Before changing this we should find a reason as to why only small size is supported for TextField in the Autocomplete component. Perhaps we should git blame to find the reason behind this..

When I override default size small for TextField when createTheme. The default size of TextField will be small.

Therefore, when I pass size prop as medium to Autocomplete, renderInput gets wrong size if the condition is same as old code.

@ZeeshanTamboli ZeeshanTamboli added the scope: autocomplete Changes related to the autocomplete. This includes ComboBox. label Sep 29, 2025
@ZeeshanTamboli ZeeshanTamboli changed the title [Autocomplete] adjust pass size to renderInput [Autocomplete] Correct size passed to renderInput Oct 1, 2025
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants