Browse Source

fix(ui): Fix alerts supported search tags (#28985)

Matej Minar 3 years ago
parent
commit
ba3da59d7b
1 changed files with 5 additions and 3 deletions
  1. 5 3
      static/app/views/alerts/incidentRules/ruleConditionsForm.tsx

+ 5 - 3
static/app/views/alerts/incidentRules/ruleConditionsForm.tsx

@@ -115,7 +115,7 @@ class RuleConditionsForm extends React.PureComponent<Props, State> {
   }
 
   get searchSupportedTags() {
-    if (this.props.dataset) {
+    if (this.props.dataset === Dataset.SESSIONS) {
       return {
         release: {
           key: 'release',
@@ -315,8 +315,10 @@ class RuleConditionsForm extends React.PureComponent<Props, State> {
                     onFilterSearch(query);
                     onChange(query, {});
                   }}
-                  supportedTags={this.searchSupportedTags}
-                  hasRecentSearches={false}
+                  {...(this.searchSupportedTags
+                    ? {supportedTags: this.searchSupportedTags}
+                    : {})}
+                  hasRecentSearches={this.props.dataset !== Dataset.SESSIONS}
                 />
               </SearchContainer>
             )}