Tempo: Fix empty values in TraceQL filters (#76544)

Fix empty values in TraceQL filters
pull/76549/head
Andre Pereira 2 years ago committed by GitHub
parent 939b311b8e
commit 69b84fec8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx

@ -81,7 +81,9 @@ const SearchField = ({
setError, setError,
query, 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 }); options.push({ label: filter.value.toString(), value: filter.value.toString(), type: filter.valueType });
} }

Loading…
Cancel
Save