[tablepagination] Add focus style to default InputBase used in Select - #48871
[tablepagination] Add focus style to default InputBase used in Select#48871silviuaavram wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Reintroduces a visible focus treatment for the native <select> element used by NativeSelect (and consumers like TablePagination), addressing a regression where focus state became difficult to perceive.
Changes:
- Adds a focus-state background color to
StyledSelectSelectinNativeSelectInput.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/mui-material/src/NativeSelect/NativeSelectInput.js:42
- The newly added
&:focusbackground color isn’t covered by any existing tests forNativeSelectInput, so it could regress again without being caught. Consider adding a browser-only unit test (e.g.it.skipIf(isJsdom())) that focuses the rendered<select>and asserts the computedbackground-colormatchestheme.palette.action.focus(ortheme.vars.palette.action.focuswhen using CSS vars).
'&:focus': {
backgroundColor: (theme.vars || theme).palette.action.focus,
// Reset Chrome style
borderRadius: 0,
},
ZeeshanTamboli
left a comment
There was a problem hiding this comment.
@silviuaavram In the PR title and description you mention InputBase. Is it input or select component?
corrected 👍🏽 |
|
Give me a second, I need to further test this one out. |
The control is focusable, so the focus style should be clearly visible. Since it's used in DataTable / TablePagination, it's high impact. Not changing anything related to InputBase or Select, since their focus style is expected.