diff --git a/packages/s2-core/src/facet/layout/layout-hooks.ts b/packages/s2-core/src/facet/layout/layout-hooks.ts index 4aadb1e8f5..d782f6ae0e 100644 --- a/packages/s2-core/src/facet/layout/layout-hooks.ts +++ b/packages/s2-core/src/facet/layout/layout-hooks.ts @@ -43,7 +43,10 @@ export const layoutHierarchy = ( const hiddenColumnNode = facetCfg.spreadsheet?.facet?.getHiddenColumnsInfo(currentNode); - if (hiddenColumnNode) { + if ( + hiddenColumnNode && + facetCfg.columns.find((field) => field === currentNode.field) + ) { return false; }