-
-
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 getFilterState
method
#13418
[DataGrid] Add getFilterState
method
#13418
Conversation
Deploy preview: https://deploy-preview-13418--material-ui-x.netlify.app/ Updated pages: |
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.
Just a few nits! Looks pretty solid!
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.
sry for the inconvenience! 🙇🏼
/** | ||
* Returns the filter state for the given filter model without applying it to the data grid. | ||
* @param {GridFilterModel} filterModel The filter model to get the state for. | ||
* @returns {GridStateCommunity['filter']} The filter state. | ||
*/ | ||
getFilterState: (filterModel: GridFilterModel) => GridStateCommunity['filter']; |
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 sounds like it should be a (pure) selector, but I see how that would be annoying to implement.
@michelengelen I need an approval from you in order to merge it |
Demo: https://deploy-preview-13418--material-ui-x.netlify.app/x/react-data-grid/filtering-recipes/#calculating-filtered-rows-in-advance
Fixes #13413