Repository navigation
fix: rework filtering behaviour - #2413
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reworks view-filter editing with staged changes and multi-value choice filtering.
Changes:
- Adds
MultiSelectsupport for choice filters. - Adds Save/Cancel filter editing.
- Updates filter condition editing behavior.
Suppressed comments (1)
apps/client/src/ee/base/components/views/view-filter-config.tsx:142
- Clearing the last selected choice emits
[], so Save persists an activeany/nonecondition with an array value even though no choice is selected. The existing multi-person filter normalizes an empty selection toundefined(filter-person-input.tsx:69); use the same normalization here, otherwise an empty array can be evaluated as a real filter rather than an unset value.
onChange={(values) => onChange(values)}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+130
to
+134
| if (isMultiChoice(condition.op)) { | ||
| const { value } = condition; | ||
| const selected = ( | ||
| Array.isArray(value) ? value : value ? [value] : [] | ||
| ).filter((id) => choices.some((c) => c.id === id)); |
Collaborator
Author
|
@Philipinho I changed the filtering UX so users have to save changes before they apply. This slightly reduces unnecessary API calls and avoids UI flashes from the base component unmounting and remounting. Not sure if you agree with this or if you prefer the way it was before? |
Member
|
LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes: #2407