Skip to content

Conversation

@siddarthan007
Copy link

@siddarthan007 siddarthan007 commented Oct 27, 2025

Fixes #47035

@mui-bot
Copy link

mui-bot commented Oct 27, 2025

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%)

Details of bundle changes

Generated by 🚫 dangerJS against 53912b1

@siddarthan007
Copy link
Author

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.

@zannager zannager added the scope: select Changes related to the select. label Oct 27, 2025
@zannager zannager requested a review from sai6855 October 27, 2025 15:16
@mj12albert mj12albert added the type: bug It doesn't behave as expected. label Nov 10, 2025
@mj12albert mj12albert changed the title [mui-material][Select] Fixed dropdown resizing bug [select] Fixed dropdown resizing bug Nov 10, 2025

const win = ownerDocument(displayNode).defaultView;
if (win) {
win.addEventListener('resize', handleResize);
Copy link
Member

Choose a reason for hiding this comment

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

@siddarthan007 Thanks for the PR ~ here it would be good to use ResizeObserver if supported, see:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: select Changes related to the select. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[select] Dropdown width does not match trigger width on window resize

5 participants