@@ -370,6 +370,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
370370 const stickyOffsets = useStickyOffsets ( colWidths , flattenColumns . length , direction ) ;
371371 const fixHeader = hasData && scroll && validateValue ( scroll . y ) ;
372372 const horizonScroll = scroll && validateValue ( scroll . x ) ;
373+ const fixColumn = horizonScroll && flattenColumns . some ( ( { fixed } ) => fixed ) ;
373374
374375 let scrollXStyle : React . CSSProperties ;
375376 let scrollYStyle : React . CSSProperties ;
@@ -469,11 +470,11 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
469470 if ( tableLayout ) {
470471 return tableLayout ;
471472 }
472- if ( fixHeader || flattenColumns . some ( ( { ellipsis, fixed } ) => ellipsis || fixed ) ) {
473+ if ( fixHeader || fixColumn || flattenColumns . some ( ( { ellipsis } ) => ellipsis ) ) {
473474 return 'fixed' ;
474475 }
475476 return 'auto' ;
476- } , [ fixHeader , flattenColumns , tableLayout ] ) ;
477+ } , [ fixHeader , fixColumn , flattenColumns , tableLayout ] ) ;
477478
478479 let groupTableNode : React . ReactNode ;
479480
@@ -625,7 +626,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
625626 [ `${ prefixCls } -ping-right` ] : pingedRight ,
626627 [ `${ prefixCls } -layout-fixed` ] : tableLayout === 'fixed' ,
627628 [ `${ prefixCls } -fixed-header` ] : fixHeader ,
628- [ `${ prefixCls } -fixed-column` ] : horizonScroll ,
629+ [ `${ prefixCls } -fixed-column` ] : fixColumn ,
629630 [ `${ prefixCls } -has-fix-left` ] : flattenColumns [ 0 ] && flattenColumns [ 0 ] . fixed ,
630631 [ `${ prefixCls } -has-fix-right` ] :
631632 flattenColumns [ flattenColumns . length - 1 ] &&
@@ -670,6 +671,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
670671 expandedRowClassName,
671672 componentWidth,
672673 fixHeader,
674+ fixColumn,
673675 horizonScroll,
674676 expandIcon : mergedExpandIcon ,
675677 expandableType,
@@ -686,6 +688,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
686688 expandedRowClassName ,
687689 componentWidth ,
688690 fixHeader ,
691+ fixColumn ,
689692 horizonScroll ,
690693 mergedExpandIcon ,
691694 expandableType ,
0 commit comments