File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
packages/s2-core/src/facet/layout Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { SpreadSheet } from '@/sheet-type';
99import { getListBySorted , filterUndefined } from '@/utils/data-set-operate' ;
1010import { getDimensionsWithoutPathPre } from '@/utils/dataset/pivot-data-set' ;
1111import { PivotDataSet } from '@/data-set' ;
12- import { ID_SEPARATOR , ROOT_ID } from '@/common/constant' ;
1312
1413const addTotals = (
1514 spreadsheet : SpreadSheet ,
@@ -41,18 +40,10 @@ export const buildRowTreeHierarchy = (params: TreeHeaderParams) => {
4140 const sortedDimensionValues =
4241 ( dataSet as PivotDataSet ) ?. sortedDimensionValues ?. [ currentField ] || [ ] ;
4342
44- // 为第一个子层级时,parentNode.id === ROOT_ID 时,不需要通过分割获取当前节点的真实 value
45- const dimensions =
46- ROOT_ID === id
47- ? sortedDimensionValues
48- : sortedDimensionValues ?. filter ( ( item ) =>
49- item ?. includes ( id ?. split ( `${ ROOT_ID } ${ ID_SEPARATOR } ` ) [ 1 ] ) ,
50- ) ;
51-
5243 const dimValues = filterUndefined (
5344 getListBySorted (
5445 [ ...( pivotMeta . keys ( ) || [ ] ) ] ,
55- [ ...getDimensionsWithoutPathPre ( [ ...dimensions ] ) ] ,
46+ [ ...getDimensionsWithoutPathPre ( [ ...sortedDimensionValues ] ) ] ,
5647 ) ,
5748 ) ;
5849
You can’t perform that action at this time.
0 commit comments