Skip to content

Conversation

@rakeshmusturi
Copy link
Contributor

@rakeshmusturi rakeshmusturi commented Feb 28, 2024

Fixes #40843

Adding condition to add popper to DOM only when the loading is happening or options are greater than 0

Adding condition to add popper to DOM only when the loading is happening or options are greater than 0
Bringing out the Popper container to a function and adding the popper to every condition, so that we can add a condition not to show popper when options are empty and loading is false
@mui-bot
Copy link

mui-bot commented Feb 28, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 8b1b546

@danilo-leal danilo-leal changed the title [material-ui][Autocomplete] Fix for Isuue 40843 : The options list is added to the DOM even when there are no options, causing style problems [material-ui][Autocomplete] Fix the options list being added to the DOM even when there are no options, causing style problems Feb 28, 2024
@danilo-leal danilo-leal added package: material-ui scope: autocomplete Changes related to the autocomplete. This includes ComboBox. labels Feb 28, 2024
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.

@rakeshmusturi Thanks for the pull request. The AutocompletePopper and AutocompletePaper components are shared among all three conditions. Can you consolidate them in one place for reuse? Also, please address the failing CI.

@ZeeshanTamboli ZeeshanTamboli added the type: bug It doesn't behave as expected. label Mar 2, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Autocomplete] Fix the options list being added to the DOM even when there are no options, causing style problems [material-ui][Autocomplete] Fix the options list being added to the DOM even when there are no options in freeSolo mode, causing style problems Mar 7, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Autocomplete] Fix the options list being added to the DOM even when there are no options in freeSolo mode, causing style problems [material-ui][Autocomplete] Fix the options list being added to the DOM in freeSolo mode even when there are no options, causing style problems Mar 7, 2024
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.

@rakeshmusturi Thanks for the pull request. I've made the expected changes, and it looks good to me.

@ZeeshanTamboli ZeeshanTamboli merged commit 5fb8e19 into mui:master Mar 7, 2024
cipherlogs pushed a commit to cipherlogs/material-ui that referenced this pull request Mar 8, 2024
…OM in `freeSolo` mode even when there are no options, causing style problems (mui#41300)

Co-authored-by: ZeeshanTamboli <[email protected]>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Mar 8, 2024
…OM in `freeSolo` mode even when there are no options, causing style problems (mui#41300)

Co-authored-by: ZeeshanTamboli <[email protected]>
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: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[material-ui][Autocomplete] The options list is added to the DOM even when there are no options, causing style problems in freeSolo mode

4 participants