Skip to content

Commit

Permalink
merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitnayan committed Jan 31, 2024
2 parents 96e3d00 + 457380c commit 2f361de
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2f361de

Please sign in to comment.