File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ export function getCellProps<RecordType>(
45
45
expanded,
46
46
hasNestChildren,
47
47
onTriggerExpand,
48
+ expandable,
48
49
expandedKeys,
49
50
} = rowInfo ;
50
51
@@ -94,14 +95,17 @@ export function getCellProps<RecordType>(
94
95
let additionalCellProps : React . TdHTMLAttributes < HTMLElement > ;
95
96
if ( column . onCell ) {
96
97
additionalCellProps = column . onCell ( record , index ) ;
97
- if ( additionalCellProps . rowSpan > 0 ) {
98
- // 本身展开 +1
99
- if ( expanded ) {
100
- additionalCellProps . rowSpan = additionalCellProps . rowSpan + 1 ;
98
+ // 开启 expanded 的增加下面逻辑
99
+ if ( expandable ) {
100
+ if ( additionalCellProps . rowSpan > 0 ) {
101
+ // 本身展开 +1
102
+ if ( expanded ) {
103
+ additionalCellProps . rowSpan = additionalCellProps . rowSpan + 1 ;
104
+ }
105
+ additionalCellProps . rowSpan = addChildrenRowSpan ( additionalCellProps . rowSpan , index ) ;
101
106
}
102
- additionalCellProps . rowSpan = addChildrenRowSpan ( additionalCellProps . rowSpan , index ) ;
107
+ // console.log(' additionalCellProps.rowSpan', additionalCellProps.rowSpan );
103
108
}
104
- console . log ( 'additionalCellProps.rowSpan' , additionalCellProps . rowSpan ) ;
105
109
}
106
110
107
111
return {
You can’t perform that action at this time.
0 commit comments