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

Fix empty values in TraceQL filters
This commit is contained in:
Andre Pereira authored and GitHub committed 2023-10-13 14:19:01 +01:00
1 parent 939b311b8e
commit 69b84fec8f
1 file changed
+3 -1
@@ -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 });
}