Skip to content

Commit d2f9aa7

Browse files
committed
fix: should pass colGroup
1 parent 2cbe690 commit d2f9aa7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/FixedHolder/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface FixedHeaderProps<RecordType> extends HeaderProps<RecordType> {
4040
tableLayout?: TableLayout;
4141
onScroll: (info: { currentTarget: HTMLDivElement; scrollLeft?: number }) => void;
4242
children: (info: HeaderProps<RecordType>) => React.ReactNode;
43+
colGroup?: React.ReactNode;
4344
}
4445

4546
const FixedHolder = React.forwardRef<HTMLDivElement, FixedHeaderProps<any>>((props, ref) => {
@@ -54,6 +55,7 @@ const FixedHolder = React.forwardRef<HTMLDivElement, FixedHeaderProps<any>>((pro
5455
columns,
5556
flattenColumns,
5657
colWidths,
58+
colGroup,
5759
columCount,
5860
stickyOffsets,
5961
direction,
@@ -185,7 +187,9 @@ const FixedHolder = React.forwardRef<HTMLDivElement, FixedHeaderProps<any>>((pro
185187
width: scrollX,
186188
}}
187189
>
188-
{isColGroupEmpty ? null : (
190+
{isColGroupEmpty ? (
191+
colGroup
192+
) : (
189193
<ColGroup
190194
colWidths={[...mergedColumnWidth, combinationScrollBarSize]}
191195
columCount={columCount + 1}

src/Table.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ const Table = <RecordType extends DefaultRecordType>(
741741
stickyTopOffset={offsetHeader}
742742
className={`${prefixCls}-header`}
743743
ref={scrollHeaderRef}
744+
colGroup={bodyColGroup}
744745
>
745746
{renderFixedHeaderTable}
746747
</FixedHolder>
@@ -756,6 +757,7 @@ const Table = <RecordType extends DefaultRecordType>(
756757
stickyBottomOffset={offsetSummary}
757758
className={`${prefixCls}-summary`}
758759
ref={scrollSummaryRef}
760+
colGroup={bodyColGroup}
759761
>
760762
{renderFixedFooterTable}
761763
</FixedHolder>

0 commit comments

Comments
 (0)