Skip to content

Conversation

@oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Aug 23, 2025

I noticed this in #46803.

SCR-20250823-pvmo

It's coming from this demo: http://0.0.0.0:3000/material-ui/react-autocomplete/#customized-hook.

It seems to be related to how React implements strict mode; it will rerender twice, but in our case, we have a side effect in the way useControlled is implemented. Now, considering that this demo is about allowing developers to create their own general-purpose autocomplete component, it felt like we were falling a bit short, so I updated the demo to better match the problem.

Preview: https://deploy-preview-46804--material-ui.netlify.app/material-ui/react-autocomplete/#customized-hook


I have also made a second commit to migrate #45387

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation. scope: autocomplete Changes related to the autocomplete. This includes ComboBox. labels Aug 23, 2025
@mui-bot
Copy link

mui-bot commented Aug 23, 2025

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@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 540723d

@oliviertassinari oliviertassinari added the type: bug It doesn't behave as expected. label Aug 23, 2025
Co-authored-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Olivier Tassinari <oliviertassinari@users.noreply.github.com>
@oliviertassinari oliviertassinari force-pushed the autocomplete-fix-warning-default-props branch from dd22e9a to 5ed090e Compare August 24, 2025 20:47
@oliviertassinari oliviertassinari force-pushed the autocomplete-fix-warning-default-props branch from 110277b to 540723d Compare August 24, 2025 20:57
@ZeeshanTamboli ZeeshanTamboli merged commit cdf1cd2 into mui:master Aug 25, 2025
24 of 25 checks passed
@oliviertassinari oliviertassinari deleted the autocomplete-fix-warning-default-props branch August 25, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. 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.

3 participants