-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] Add prop to override search input props in GridColumnsManagement
#15347
Conversation
Localization writing tips ✍️Seems you are updating localization 🌍 files. Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️
Deploy preview: https://deploy-preview-15347--material-ui-x.netlify.app/ |
packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx
Show resolved
Hide resolved
c4bea42
to
59a256b
Compare
}} | ||
autoComplete="off" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visibility: 'hidden', | ||
}, | ||
]} | ||
tabIndex={-1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to align with #14587
<rootProps.slots.quickFilterClearIcon fontSize="small" /> | ||
</rootProps.slots.baseIconButton> | ||
), | ||
sx: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we try to avoid the sx
prop where possible in the grid - could we use the styled util for these styles instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have shifted those styles to its parent which uses styled
, it selects the input with type="search" and applies the styles to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better in it's own styled
for the input itself, it's clearer that the styles belong to that element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added it,
also tried using styled only for input in inputComponent prop inside InputProps
but it didn't seem to work well.
followed this section of docs https://mui.com/material-ui/react-text-field/#using-the-styled-api
do we also need to add a class for style overrides?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think we should have a class on it for overrides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok for me - I have pushed the changes it generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I have resolved the merge conflicts
would you like to give it a final look before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there is a slight size difference in the panel now 🤔
Shouldn't be a big problem, but any idea why? https://app.argos-ci.com/mui/mui-x/builds/26671/119787928
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is due to the addition of endAdornment
property, mui text field internally adds a different class which brings the right padding. I've set equal padding to the left and right both 12px.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx
Outdated
Show resolved
Hide resolved
7611262
to
a0e82e6
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx
Outdated
Show resolved
Hide resolved
eb5cea8
to
b1ccc35
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this 🎉
…agement` (mui#15347) Co-authored-by: Kenan Yusuf <kenan.m.yusuf@gmail.com>
…agement` (mui#15347) Co-authored-by: Kenan Yusuf <kenan.m.yusuf@gmail.com>
Closes #15055
Preview: https://codesandbox.io/p/sandbox/mui-mui-x-x-data-grid-forked-rw7shs