-
-
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
[core] Apply all filters on a row before passing to the next one #2870
Conversation
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.
Niice.
packages/grid/_modules_/grid/hooks/features/filter/useGridFilter.ts
Outdated
Show resolved
Hide resolved
Looks great!
They can still apply all filters right, it's just a matter of using the other method and passing in an array with a single item in it. That way a single filter will be applied. |
No, you don't pass the filter items to And if a user want to edit the All of them calls
(+ the filter panel visibility methods which are not directly related) I am not even sure
I does not exist anymore since we don't apply filter by filter but row by row. Side note : I will do a follow up PR one day so that |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Part of #2725
Requires #2673
The new behavior is very similar to what we have with the sorting.
forceUpdate
perapplyFilters
even when multiple filters are appliedlinkOperator = "and"
and a previous filter failedlinkOperator = "or"
and a previous filter passedIf we have 2 rows (row1 and row2) and 2 filters (filterA and filterB)
Before this PR, the execution order is
After this PR, the execution order is
Executing all filters on a row in a single pass will help me apply constraints on the tree data (for instance do not filter the child if the parents is not passing the filters).
Do you see any interest to let users apply a single filter like they currently can ? It is not resetting the other filters so I don't really see use-cases where the behavior is not broken.
And it creates a
visibleRows
that is not in sync with thefilterModel
, which we should avoid.Breaking changes
For
applyFilters
, you should never have to call it directly since all the other method that update the rows or thefilterModel
are calling it directly or not.