[select] Fixed dropdown resizing bug
Fixes https://github.com/mui/material-ui/issues/47035
- [x] I have followed (at least) the PR section of the contributing guide.
Netlify deploy preview
https://deploy-preview-47137--material-ui.netlify.app/
Bundle size report
| Bundle | Parsed size | Gzip size |
|---|---|---|
| @mui/material | 🔺+271B(+0.05%) | 🔺+109B(+0.07%) |
| @mui/lab | 0B(0.00%) | 0B(0.00%) |
| @mui/system | 0B(0.00%) | 0B(0.00%) |
| @mui/utils | 0B(0.00%) | 0B(0.00%) |
Generated by :no_entry_sign: dangerJS against 53912b1626b752b54f45610fcdf4748d85cf6d9d
PR Title
[mui-material][Select] Fixed dropdown resizing bug #47137
PR Description
Summary
This PR fixes a bug that caused the Select component drop-down width to not match trigger width on window resize. (#47035 ) by listening to the window resize and handling the width of the component using setMenuMinWidthState().
Files changed:
-
packages/mui-material/src/Select/SelectInput.js -
packages/mui-material/src/Select/Select.test.js
Problem Solved
The issue was successfully solved when tested in the playground.
Since there isn't any reply in the past one week, I'll close this PR.