Skip to content

Commit

Permalink
fix(alerts): Fix EAP alert filter bar to behave more like explore (#8…
Browse files Browse the repository at this point in the history
…1946)

Updates the search bar in the EAP Alert edit page to behave more like
explore:
- User must explicitly save changes on the search (hitting enter) for
updates to take effect. Same as explore.
- Removed onBlur handler

This also fixes an issue where the chart visualization updates, but
saving the alert rule doesn't actually save the changed filter because
it was not actually committed
  • Loading branch information
edwardgou-sentry authored and andrewshie-sentry committed Jan 2, 2025
1 parent 08b580d commit 8e4858c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions static/app/views/alerts/rules/metric/ruleConditionsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,12 @@ class RuleConditionsForm extends PureComponent<Props, State> {
<EAPSpanSearchQueryBuilder
numberTags={tags?.number ?? {}}
stringTags={tags?.string ?? {}}
initialQuery={initialData?.query ?? ''}
initialQuery={value ?? ''}
searchSource="alerts"
onSearch={(query, {parsedQuery}) => {
onFilterSearch(query, parsedQuery);
onChange(query, {});
}}
onBlur={(query, {parsedQuery}) => {
onFilterSearch(query, parsedQuery);
onBlur(query);
}}
supportedAggregates={ALLOWED_EXPLORE_VISUALIZE_AGGREGATES}
projects={[parseInt(project.id, 10)]}
/>
Expand Down

0 comments on commit 8e4858c

Please sign in to comment.