@@ -37,12 +37,10 @@ export interface CellProps<RecordType extends DefaultRecordType> {
3737 shouldCellUpdate ?: ( record : RecordType , prevRecord : RecordType ) => boolean ;
3838
3939 // Fixed
40- fixLeft ?: number | false ;
41- fixRight ?: number | false ;
42- firstFixLeft ?: boolean ;
43- lastFixLeft ?: boolean ;
44- firstFixRight ?: boolean ;
45- lastFixRight ?: boolean ;
40+ fixStart ?: number | false ;
41+ fixEnd ?: number | false ;
42+ fixedStartShadow ?: boolean ;
43+ fixedEndShadow ?: boolean ;
4644 allColsFixedLeft ?: boolean ;
4745
4846 // ====================== Private Props ======================
@@ -104,12 +102,10 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
104102 rowSpan,
105103
106104 // Fixed
107- fixLeft,
108- fixRight,
109- firstFixLeft,
110- lastFixLeft,
111- firstFixRight,
112- lastFixRight,
105+ fixStart,
106+ fixEnd,
107+ fixedStartShadow,
108+ fixedEndShadow,
113109
114110 // Private
115111 appendNode,
@@ -118,8 +114,7 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
118114 } = props ;
119115
120116 const cellPrefixCls = `${ prefixCls } -cell` ;
121- const { supportSticky, allColumnsFixedLeft, rowHoverable } = useContext ( TableContext , [
122- 'supportSticky' ,
117+ const { allColumnsFixedLeft, rowHoverable } = useContext ( TableContext , [
123118 'allColumnsFixedLeft' ,
124119 'rowHoverable' ,
125120 ] ) ;
@@ -136,16 +131,14 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
136131
137132 // ====================== Fixed =======================
138133 const fixedStyle : React . CSSProperties = { } ;
139- const isFixLeft = typeof fixLeft === 'number' && supportSticky ;
140- const isFixRight = typeof fixRight === 'number' && supportSticky ;
134+ const isFixStart = typeof fixStart === 'number' ;
135+ const isFixEnd = typeof fixEnd === 'number' ;
141136
142- if ( isFixLeft ) {
143- fixedStyle . position = 'sticky' ;
144- fixedStyle . left = fixLeft as number ;
137+ if ( isFixStart ) {
138+ fixedStyle . insetInlineStart = fixStart as number ;
145139 }
146- if ( isFixRight ) {
147- fixedStyle . position = 'sticky' ;
148- fixedStyle . right = fixRight as number ;
140+ if ( isFixEnd ) {
141+ fixedStyle . insetInlineEnd = fixEnd as number ;
149142 }
150143
151144 // ================ RowSpan & ColSpan =================
@@ -190,16 +183,21 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
190183 cellPrefixCls ,
191184 className ,
192185 {
193- [ `${ cellPrefixCls } -fix-left` ] : isFixLeft && supportSticky ,
194- [ `${ cellPrefixCls } -fix-left-first` ] : firstFixLeft && supportSticky ,
195- [ `${ cellPrefixCls } -fix-left-last` ] : lastFixLeft && supportSticky ,
196- [ `${ cellPrefixCls } -fix-left-all` ] : lastFixLeft && allColumnsFixedLeft && supportSticky ,
197- [ `${ cellPrefixCls } -fix-right` ] : isFixRight && supportSticky ,
198- [ `${ cellPrefixCls } -fix-right-first` ] : firstFixRight && supportSticky ,
199- [ `${ cellPrefixCls } -fix-right-last` ] : lastFixRight && supportSticky ,
186+ // Fixed
187+ [ `${ cellPrefixCls } -fix` ] : isFixStart || isFixEnd ,
188+ [ `${ cellPrefixCls } -fix-start` ] : isFixStart ,
189+ // [`${cellPrefixCls}-fix-left-first`]: firstFixLeft && supportSticky,
190+ // [`${cellPrefixCls}-fix-left-last`]: lastFixLeft && supportSticky,
191+ // [`${cellPrefixCls}-fix-left-all`]: lastFixLeft && allColumnsFixedLeft && supportSticky,
192+ [ `${ cellPrefixCls } -fix-end` ] : isFixEnd ,
193+ // [`${cellPrefixCls}-fix-right-first`]: firstFixRight && supportSticky,
194+ // [`${cellPrefixCls}-fix-right-last`]: lastFixRight && supportSticky,
195+
196+ // Fixed shadow
197+
200198 [ `${ cellPrefixCls } -ellipsis` ] : ellipsis ,
201199 [ `${ cellPrefixCls } -with-append` ] : appendNode ,
202- [ `${ cellPrefixCls } -fix-sticky` ] : ( isFixLeft || isFixRight ) && isSticky && supportSticky ,
200+ [ `${ cellPrefixCls } -fix-sticky` ] : ( isFixStart || isFixEnd ) && isSticky ,
203201 [ `${ cellPrefixCls } -row-hover` ] : ! legacyCellProps && hovering ,
204202 } ,
205203 additionalProps . className ,
@@ -233,9 +231,9 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
233231 mergedChildNode = null ;
234232 }
235233
236- if ( ellipsis && ( lastFixLeft || firstFixRight ) ) {
237- mergedChildNode = < span className = { `${ cellPrefixCls } -content` } > { mergedChildNode } </ span > ;
238- }
234+ // if (ellipsis && (lastFixLeft || firstFixRight)) {
235+ // mergedChildNode = <span className={`${cellPrefixCls}-content`}>{mergedChildNode}</span>;
236+ // }
239237
240238 return (
241239 < Component
0 commit comments