@@ -370,6 +370,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
370
370
const stickyOffsets = useStickyOffsets ( colWidths , flattenColumns . length , direction ) ;
371
371
const fixHeader = hasData && scroll && validateValue ( scroll . y ) ;
372
372
const horizonScroll = scroll && validateValue ( scroll . x ) ;
373
+ const fixColumn = horizonScroll && flattenColumns . some ( ( { fixed } ) => fixed ) ;
373
374
374
375
let scrollXStyle : React . CSSProperties ;
375
376
let scrollYStyle : React . CSSProperties ;
@@ -469,11 +470,11 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
469
470
if ( tableLayout ) {
470
471
return tableLayout ;
471
472
}
472
- if ( fixHeader || flattenColumns . some ( ( { ellipsis, fixed } ) => ellipsis || fixed ) ) {
473
+ if ( fixHeader || fixColumn || flattenColumns . some ( ( { ellipsis } ) => ellipsis ) ) {
473
474
return 'fixed' ;
474
475
}
475
476
return 'auto' ;
476
- } , [ fixHeader , flattenColumns , tableLayout ] ) ;
477
+ } , [ fixHeader , fixColumn , flattenColumns , tableLayout ] ) ;
477
478
478
479
let groupTableNode : React . ReactNode ;
479
480
@@ -625,7 +626,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
625
626
[ `${ prefixCls } -ping-right` ] : pingedRight ,
626
627
[ `${ prefixCls } -layout-fixed` ] : tableLayout === 'fixed' ,
627
628
[ `${ prefixCls } -fixed-header` ] : fixHeader ,
628
- [ `${ prefixCls } -fixed-column` ] : horizonScroll ,
629
+ [ `${ prefixCls } -fixed-column` ] : fixColumn ,
629
630
[ `${ prefixCls } -has-fix-left` ] : flattenColumns [ 0 ] && flattenColumns [ 0 ] . fixed ,
630
631
[ `${ prefixCls } -has-fix-right` ] :
631
632
flattenColumns [ flattenColumns . length - 1 ] &&
@@ -670,6 +671,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
670
671
expandedRowClassName,
671
672
componentWidth,
672
673
fixHeader,
674
+ fixColumn,
673
675
horizonScroll,
674
676
expandIcon : mergedExpandIcon ,
675
677
expandableType,
@@ -686,6 +688,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
686
688
expandedRowClassName ,
687
689
componentWidth ,
688
690
fixHeader ,
691
+ fixColumn ,
689
692
horizonScroll ,
690
693
mergedExpandIcon ,
691
694
expandableType ,
0 commit comments