From 457380c0650a5c5c546bb9f30b62df026857d7b2 Mon Sep 17 00:00:00 2001 From: Yunus M Date: Thu, 1 Feb 2024 00:13:42 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20Logs=20UI:=20querybuildersearc?= =?UTF-8?q?h:=20avoid=20emptying=20out=20query=20on=20sourceK=E2=80=A6"=20?= =?UTF-8?q?(#4473)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 085cf34a49434e90f8ec50428a52017e14a985a3. --- .../filters/QueryBuilderSearch/index.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearch/index.tsx b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearch/index.tsx index d12bc18add..975c79a4a8 100644 --- a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearch/index.tsx +++ b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearch/index.tsx @@ -150,20 +150,6 @@ function QueryBuilderSearch({ (item) => item.key as BaseAutocompleteData, ); - // Avoid updating query with onChange at the bottom of this useEffect - // if there are no `tags` that need to be normalized after receiving - // the latest `sourceKeys`. - // - // Executing the following logic for empty tags leads to emptying - // out of `query` via `onChange`. - // `tags` can contain stale empty value while being updated by `useTag` - // which maintains it as a state and updates it via useEffect when props change. - // This was observed when pipeline filters were becoming empty after - // returning from logs explorer. - if ((tags?.length || 0) < 1) { - return; - } - initialTagFilters.items = tags.map((tag, index) => { const isJsonTrue = query.filters?.items[index]?.key?.isJSON;