-
Notifications
You must be signed in to change notification settings - Fork 189
[JSX] Relax Strictness of Filter for Multiselect in Filter Component #9402
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
[JSX] Relax Strictness of Filter for Multiselect in Filter Component #9402
Conversation
|
Hum, do you have a use case for this change ? I am not sure we want it if it is not used somewhere. |
|
The use-case is all uses of FilterableDatatable because this would influence the behaviour of multi-select filters across the board. The idea is that multi-select filters should function with OR behaviour rather than AND behaviour. For example, if you want to filter based on projects and you want to select rows that include a given set of projects, currently that's not possible because it will make sure the row exactly matches the selected projects. Let me know if that clears things up @maximemulder — if not i can try and provide a better example. But in general I think this needs discussion, since it's a pretty large change and it might merit having some sort of optional toggle or module-specific configuration because users might be thrown off by the behaviour change. @ridz1208 and @driusan do you have any thoughts based on the PR description? |
|
Oh, hum okay, I do see a utility in your projects example. But I am not the best person to answer whether or not this is a desirable feature, so I guess we should either get a reply from the devs you pinged or talk about it at a LORIS meeting (every Tuesday at 11AM). |
|
We discussed this PR at the LORIS meeting and concluded that an OR is likely the most intuitive behavior. So this change is approved. @skarya22 makes a good point about the AND behavior also being desirable in some cases. IMO we accept the OR as a default behavior (that is, this PR, I'll test it right away), and in the future we might want to add a switch to change the behavior depending on the user's needs. |
maximemulder
left a comment
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.
Works on my machine !
…ces#9402) This reduces the strictness of the filter logic in the Filter.js component by adjusting the conditions for the exactMatch variable, thereby functionally changing the multiselect filter from an AND to an OR boolean operators.
Brief summary of changes
This PR reduces the strictness of the filter logic in the Filter.js component by adjusting the conditions for the exactMatch variable, functionally changing the multiselect filter from an AND to an OR boolean operators.
If this change is contentious, I can work on a way of have this be decided either by individual modules via a prop, or by use input by incorporating some sort of toggle button.