Browse Source

ref(replay/feedback): don't suggest empty tag (#80353)

resolves JAVASCRIPT-2WH4

before:



https://github.com/user-attachments/assets/fffce18d-99a3-488a-94a1-c9870f16adbb

after:


https://github.com/user-attachments/assets/1b8cc0d2-e3a8-4185-9b91-29d86b42655c
Michelle Zhang 4 months ago
parent
commit
09f75b6f1b

+ 4 - 1
static/app/components/feedback/feedbackSearch.tsx

@@ -177,7 +177,10 @@ export default function FeedbackSearch() {
         projectIds: projectIds?.map(String),
         endpointParams,
       }).then(
-        tagValues => (tagValues as TagValue[]).map(({value}) => value),
+        tagValues =>
+          (tagValues as TagValue[])
+            .filter(tagValue => tagValue.name !== '')
+            .map(({value}) => value),
         () => {
           throw new Error('Unable to fetch event field values');
         }

+ 4 - 1
static/app/views/replays/list/replaySearchBar.tsx

@@ -168,7 +168,10 @@ function ReplaySearchBar(props: Props) {
         endpointParams,
         includeReplays: true,
       }).then(
-        tagValues => (tagValues as TagValue[]).map(({value}) => value),
+        tagValues =>
+          (tagValues as TagValue[])
+            .filter(tagValue => tagValue.name !== '')
+            .map(({value}) => value),
         () => {
           throw new Error('Unable to fetch event field values');
         }