Skip to content

Commit a5c4daa

Browse files
authored
fix(trends): Fix default query reappearing in edge case (#22032)
There was an edge case where if you navigated from another performance tab and completely removed the query, it would reappear the first time. This fixes it so the query no longer reappears by fixing the default trends to be also ignored if someone came to the page with a query.
1 parent 8ba5304 commit a5c4daa

File tree

1 file changed

+2
-1
lines changed
  • src/sentry/static/sentry/app/views/performance/trends

1 file changed

+2
-1
lines changed

src/sentry/static/sentry/app/views/performance/trends/content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ class DefaultTrends extends React.Component<DefaultTrendsProps> {
232232
const conditions = tokenizeSearch(queryString || '');
233233

234234
if (queryString || this.hasPushedDefaults) {
235+
this.hasPushedDefaults = true;
235236
return <React.Fragment>{children}</React.Fragment>;
236237
} else {
238+
this.hasPushedDefaults = true;
237239
conditions.setTagValues('tpm()', ['>0.01']);
238240
conditions.setTagValues('transaction.duration', ['>0', `<${DEFAULT_MAX_DURATION}`]);
239241
}
@@ -250,7 +252,6 @@ class DefaultTrends extends React.Component<DefaultTrendsProps> {
250252
view: FilterViews.TRENDS,
251253
},
252254
});
253-
this.hasPushedDefaults = true;
254255
return null;
255256
}
256257
}

0 commit comments

Comments
 (0)