From 4f86694d45815270b023e4c57fec49b81478d8cd Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 11 Oct 2024 03:22:26 +1100 Subject: [PATCH] [8.15] [Security Solution][Detection Engine] fixes showing all the fields for all indices when trying to edit filters in a rule (#194678) (#195783) # Backport This will backport the following commits from `main` to `8.15`: - [[Security Solution][Detection Engine] fixes showing all the fields for all indices when trying to edit filters in a rule (#194678)](https://github.com/elastic/kibana/pull/194678) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>"}}]}] BACKPORT--> Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com> --- .../public/common/components/query_bar/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx index a711e8e8e222d..23087fa6eb9e8 100644 --- a/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { cloneDeep } from 'lodash'; +import { cloneDeep, isEmpty } from 'lodash'; import React, { memo, useMemo, useCallback, useState, useEffect } from 'react'; import deepEqual from 'fast-deep-equal'; @@ -125,7 +125,7 @@ export const QueryBar = memo( let dv: DataView; if (isDataView(indexPattern)) { setDataView(indexPattern); - } else if (!isEsql) { + } else if (!isEsql && !isEmpty(indexPattern.title)) { const createDataView = async () => { dv = await data.dataViews.create({ id: indexPattern.title, title: indexPattern.title }); setDataView(dv);