File tree Expand file tree Collapse file tree 3 files changed +66
-23
lines changed
common/changes/@visactor/vtable
packages/vtable/src/scenegraph/group-creater Expand file tree Collapse file tree 3 files changed +66
-23
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "changes" : [
3
+ {
4
+ "comment" : " fix: hide rowSeriesNumber and checkbox in aggregation #2173\n\n " ,
5
+ "type" : " none" ,
6
+ "packageName" : " @visactor/vtable"
7
+ }
8
+ ],
9
+ "packageName" : " @visactor/vtable" ,
10
+ "email" : " zzh7498624@163.com"
11
+ }
Original file line number Diff line number Diff line change @@ -349,27 +349,55 @@ export function createCell(
349
349
isAsync
350
350
) ;
351
351
} else if ( type === 'checkbox' ) {
352
- const createCheckboxCellGroup = Factory . getFunction ( 'createCheckboxCellGroup' ) as CreateCheckboxCellGroup ;
353
- cellGroup = createCheckboxCellGroup (
354
- null ,
355
- columnGroup ,
356
- 0 ,
357
- y ,
358
- col ,
359
- row ,
360
- colWidth ,
361
- cellWidth ,
362
- cellHeight ,
363
- padding ,
364
- textAlign ,
365
- textBaseline ,
366
- mayHaveIcon ,
367
- table ,
368
- cellTheme ,
369
- define as CheckboxColumnDefine ,
370
- range ,
371
- isAsync
372
- ) ;
352
+ const isAggregation =
353
+ 'isAggregation' in table . internalProps . layoutMap && table . internalProps . layoutMap . isAggregation ( col , row ) ;
354
+ const isSeriesNumber = table . internalProps . layoutMap . isSeriesNumber ( col , row ) ;
355
+ if ( isAggregation && isSeriesNumber ) {
356
+ const createTextCellGroup = Factory . getFunction ( 'createTextCellGroup' ) as CreateTextCellGroup ;
357
+ cellGroup = createTextCellGroup (
358
+ table ,
359
+ value ,
360
+ columnGroup ,
361
+ 0 ,
362
+ y ,
363
+ col ,
364
+ row ,
365
+ colWidth ,
366
+ cellWidth ,
367
+ cellHeight ,
368
+ padding ,
369
+ textAlign ,
370
+ textBaseline ,
371
+ false ,
372
+ undefined ,
373
+ true ,
374
+ cellTheme ,
375
+ range ,
376
+ isAsync
377
+ ) ;
378
+ } else {
379
+ const createCheckboxCellGroup = Factory . getFunction ( 'createCheckboxCellGroup' ) as CreateCheckboxCellGroup ;
380
+ cellGroup = createCheckboxCellGroup (
381
+ null ,
382
+ columnGroup ,
383
+ 0 ,
384
+ y ,
385
+ col ,
386
+ row ,
387
+ colWidth ,
388
+ cellWidth ,
389
+ cellHeight ,
390
+ padding ,
391
+ textAlign ,
392
+ textBaseline ,
393
+ mayHaveIcon ,
394
+ table ,
395
+ cellTheme ,
396
+ define as CheckboxColumnDefine ,
397
+ range ,
398
+ isAsync
399
+ ) ;
400
+ }
373
401
} else if ( type === 'radio' ) {
374
402
const createRadioCellGroup = Factory . getFunction ( 'createRadioCellGroup' ) as CreateRadioCellGroup ;
375
403
cellGroup = createRadioCellGroup (
Original file line number Diff line number Diff line change @@ -141,11 +141,15 @@ export function createComplexColumn(
141
141
? table . getHeaderDefine ( colForDefine , rowForDefine )
142
142
: table . getBodyColumnDefine ( colForDefine , rowForDefine ) ;
143
143
}
144
+ const isAggregation =
145
+ 'isAggregation' in table . internalProps . layoutMap && table . internalProps . layoutMap . isAggregation ( col , row ) ;
146
+ const isSeriesNumber = table . internalProps . layoutMap . isSeriesNumber ( col , row ) ;
147
+
144
148
let mayHaveIcon =
145
149
cellLocation !== 'body'
146
150
? true
147
- : ( define as IRowSeriesNumber ) ?. dragOrder || ! ! define ?. icon || ! ! ( define as ColumnDefine ) ?. tree ;
148
-
151
+ : ( ( define as IRowSeriesNumber ) ?. dragOrder || ! ! define ?. icon || ! ! ( define as ColumnDefine ) ?. tree ) &&
152
+ ! ( isAggregation && isSeriesNumber ) ;
149
153
if (
150
154
! range &&
151
155
( table . internalProps . enableTreeNodeMerge || cellLocation !== 'body' || ( define as TextColumnDefine ) ?. mergeCell )
You can’t perform that action at this time.
0 commit comments