@@ -166,8 +166,8 @@ const DataTable: FC<DataTableProps> = (
166
166
< tr key = { headerGroup . id } >
167
167
{ headerGroup . headers . map ( ( header ) => (
168
168
< th key = { header . id } style = { { width : header . column . columnDef . meta ?. size , position : header . column . columnDef . meta ?. sticky ? 'sticky' : undefined ,
169
- left : header . column . columnDef . meta ?. sticky === 'left' ? 0 : undefined ,
170
- right : header . column . columnDef . meta ?. sticky === 'right' ? 0 : undefined ,
169
+ left : header . column . columnDef . meta ?. sticky === 'left' ? ` ${ header . column . getAfter ( 'left' ) * 0.675 } px` : undefined ,
170
+ right : header . column . columnDef . meta ?. sticky === 'right' ? ` ${ header . column . getAfter ( 'right' ) * 0.675 } px` : undefined ,
171
171
backgroundColor : 'white' , zIndex : header . column . columnDef . meta ?. sticky ? 1 : 0 } } >
172
172
{ header . isPlaceholder ? null : (
173
173
< Track gap = { 8 } >
@@ -199,8 +199,8 @@ const DataTable: FC<DataTableProps> = (
199
199
< tr key = { row . id } style = { table . options . meta ?. getRowStyles ( row ) } >
200
200
{ row . getVisibleCells ( ) . map ( ( cell ) => (
201
201
< td key = { cell . id } style = { { position : cell . column . columnDef . meta ?. sticky ? 'sticky' : undefined ,
202
- left : cell . column . columnDef . meta ?. sticky === 'left' ? 0 : undefined ,
203
- right : cell . column . columnDef . meta ?. sticky === 'right' ? 0 : undefined ,
202
+ left : cell . column . columnDef . meta ?. sticky === 'left' ? ` ${ cell . column . getAfter ( 'left' ) * 0.675 } px` : undefined ,
203
+ right : cell . column . columnDef . meta ?. sticky === 'right' ? ` ${ cell . column . getAfter ( 'right' ) * 0.675 } px` : undefined ,
204
204
backgroundColor : 'white' , zIndex : cell . column . columnDef . meta ?. sticky ? 1 : 0 } } > { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) } </ td >
205
205
) ) }
206
206
</ tr >
0 commit comments