Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[DataGridPro] Implement header filter height #12666
[DataGridPro] Implement header filter height #12666
Changes from 1 commit
95ccde6
9738005
151af8f
bbecf61
4fb850c
42367c6
1dfac67
423b793
3ae572d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Also, shouldn't this prop belong to
dataGridProProps.ts
likeheaderFilters
boolean flag?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 need it in community for the dimensions logic.
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.
Alright, bdw, I just merged #12365
Maybe
headerFilterHeight
could be placed inDataGridProcessedPropsWithShared
just like theheaderFilters
boolean.That way we won't be exposing it to MIT users yet make it accessible in the
@mui/x-data-grid
scope.Wdyt?
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.
What was the reason for splitting
DataGridProcessedProps
andDataGridProcessedPropsWithShared
? Having some trouble fixing the types becauseDataGridProcessedProps
is used in many places whereDataGridProcessedPropsWithShared
should be used. AFAIK,DataGridProcessedProps
is not used by external users so we should be able to place final typings there.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.
The main reason for keeping a line between
DataGridProcessedProps
andDataGridProcessedPropsWithShared
in my mind was to reflect a better understanding of the specific scenario.For example hook A and B.
A
uses some shared props from higher packages, it could be easily guessed by the reader of the code by the import nameDataGridProcessedPropsWithShared
Wheras
B
doesn't use a shared prop.It's obvious just by looking at the first few lines of the file which hook uses shared props and which don't. It might be helpful on the understanding side for new maintainers.
But I agree that making them part of
DataGridProcessedProps
along with wrapping them inPartial<>
may also do the job + simplify the maintaining the types. I do not have a hard preference on either of them. Feel free to go with the suggested refactoring.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.
Did the refactor. Feels better this way because the typings reflect what's really present.