-
-
Notifications
You must be signed in to change notification settings - Fork 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
feat(query-builder): Add basic support for selecting multiple values #71457
feat(query-builder): Add basic support for selecting multiple values #71457
Conversation
static/app/components/searchQueryBuilder/useQueryBuilderState.tsx
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #71457 +/- ##
===========================================
- Coverage 88.02% 77.88% -10.14%
===========================================
Files 2870 6537 +3667
Lines 178471 291097 +112626
Branches 32036 50391 +18355
===========================================
+ Hits 157093 226724 +69631
- Misses 15496 58125 +42629
- Partials 5882 6248 +366
|
0766201
to
8b7bb09
Compare
return {...state, query: replaceQueryToken(state.query, token.value, newValue)}; | ||
} | ||
|
||
function mutliSelectTokenValue( |
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.
function mutliSelectTokenValue( | |
function multiSelectTokenValue( |
last one I promise
(One usage of this function below too)
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.
How do I keep messing this up hah
@@ -121,6 +198,10 @@ export function useQueryBuilderState({initialQuery}: {initialQuery: string}) { | |||
return { | |||
query: replaceQueryToken(state.query, action.token, action.value), | |||
}; | |||
case 'TOGGLE_FILTER_VALUE': | |||
return mutliSelectTokenValue(state, action); |
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.
return mutliSelectTokenValue(state, action); | |
return multiSelectTokenValue(state, action); |
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.
looks amazing! I would definitely get someone else to review too but the UI and the code layout are 👌
…71457) Ref #69791 For text and number filters, add checkboxes and allow multiple value selection. Other filter types retain the same functionality as before. Behavior is as follows: - Clicking the row selects the value and exits the token - Clicking the checkbox selects the value and keeps focus inside the token - Pressing backspace will unselect the previous value - Selected values are always shown at the top of the flyout
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Ref #69791
For text and number filters, add checkboxes and allow multiple value selection. Other filter types retain the same functionality as before.
Behavior is as follows:
CleanShot.2024-05-23.at.11.30.05.mp4