Select menu width not taking border into account #41142
Labels
component: select
This is the name of the generic UI component, not the React module!
support: Stack Overflow
Please ask the community on Stack Overflow
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-4lhmay?file=Demo.tsx
Steps:
MuiFormControl-root
width.I am not sure why the menu appears slightly to the right under the dropdown, but I would ignore this, it is not happening in my project.
Current behavior
The width of the select menu is not calculated correctly because it does not include the select's borders in the calculation.
Expected behavior
The menu width should match the select width even if it has borders.
Context
I'm trying to get the dropdown menu to appear as the same width as the select without explicitly telling the menu to be 328px as well, and that solution isn't really viable for mobile since we want the select to be 100% of the width of the viewport.
Your environment
npx @mui/envinfo
Search keywords: select menu width
The text was updated successfully, but these errors were encountered: