diff --git a/public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx b/public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx index d8b4a741ce1..01424057f17 100644 --- a/public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx +++ b/public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx @@ -81,7 +81,9 @@ const SearchField = ({ setError, query, ]); - if (filter.value && options && !options.find((o) => o === filter.value)) { + + // Add selected option if it doesn't exist in the current list of options + if (filter.value && !Array.isArray(filter.value) && options && !options.find((o) => o.value === filter.value)) { options.push({ label: filter.value.toString(), value: filter.value.toString(), type: filter.valueType }); }