From 606b48a3dd647ff781f2d1acf57c33829c83c2fc Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 29 Jun 2023 09:54:16 -0400 Subject: [PATCH] [8.9] [Unified Search] Enable filtersBuilder depth of 1 (#160691) (#160884) # Backport This will backport the following commits from `main` to `8.9`: - [[Unified Search] Enable filtersBuilder depth of 1 (#160691)](https://github.com/elastic/kibana/pull/160691) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Kevin Qualters <56408403+kqualters-elastic@users.noreply.github.com> --- .../unified_search/public/filters_builder/filter_group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/unified_search/public/filters_builder/filter_group.tsx b/src/plugins/unified_search/public/filters_builder/filter_group.tsx index cad3cee7a9063..73813e512a229 100644 --- a/src/plugins/unified_search/public/filters_builder/filter_group.tsx +++ b/src/plugins/unified_search/public/filters_builder/filter_group.tsx @@ -81,7 +81,7 @@ export const FilterGroup = ({ } = useContext(FiltersBuilderContextType); const pathInArray = getPathInArray(path); - const isDepthReached = maxDepth <= pathInArray.length; + const isDepthReached = maxDepth <= pathInArray.length && renderedLevel > 0; const orDisabled = hideOr || (isDepthReached && booleanRelation === BooleanRelation.AND); const andDisabled = isDepthReached && booleanRelation === BooleanRelation.OR;