diff --git a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts index 56ca02d918c98..54dfd9ecda7b1 100644 --- a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts +++ b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts @@ -82,7 +82,7 @@ export type PivotAggDict = { /** * The maximum level of sub-aggregations */ -export const MAX_NESTING_SUB_AGGS = 2; +export const MAX_NESTING_SUB_AGGS = 10; // The internal representation of an aggregation definition. export interface PivotAggsConfigBase { diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx index f835e640abf31..82b885bf4f775 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx @@ -43,7 +43,7 @@ export const SubAggsSection: FC<{ item: PivotAggsConfig }> = ({ item }) => { ); const isNewSubAggAllowed: boolean = useMemo(() => { - let nestingLevel = 0; + let nestingLevel = 1; let parentItem = item.parentAgg; while (parentItem !== undefined) { nestingLevel++;