@@ -375,20 +375,24 @@ export function Table<
375375 rowIndex : number ,
376376 interactiveRow : boolean
377377 ) {
378- return cells . map ( ( cell , index ) => (
379- < CellContainer
380- { ...cell . getCellProps ( ) }
381- index = { rowIndex }
382- lastLeftSticky = { index === lastStickyColumnIndex }
383- style = { stickyLeftColumnStyle [ cell . column . id ] }
384- first = { index === 0 }
385- last = { ( index + 1 ) % flatColumns . length === 0 }
386- interactiveRow = { interactiveRow }
387- withDividers = { withDividers }
388- >
389- { cell . render ( "Cell" ) }
390- </ CellContainer >
391- ) ) ;
378+ return cells . map ( ( cell , index ) => {
379+ const { key, ...cellProps } = cell . getCellProps ( ) ;
380+ return (
381+ < CellContainer
382+ key = { key }
383+ { ...cellProps }
384+ index = { rowIndex }
385+ lastLeftSticky = { index === lastStickyColumnIndex }
386+ style = { stickyLeftColumnStyle [ cell . column . id ] }
387+ first = { index === 0 }
388+ last = { ( index + 1 ) % flatColumns . length === 0 }
389+ interactiveRow = { interactiveRow }
390+ withDividers = { withDividers }
391+ >
392+ { cell . render ( "Cell" ) }
393+ </ CellContainer >
394+ ) ;
395+ } ) ;
392396 }
393397
394398 const rowsToRender = virtualizeRows
@@ -581,6 +585,7 @@ function ColumnHeader<D extends Record<string, unknown>>({
581585 ) : null ;
582586
583587 const hasHeaderContent = column . Header || hint || sortIcon ;
588+ const { key : _key , ...headerProps } = column . getHeaderProps ( column . getSortByToggleProps ( ) ) ;
584589
585590 return (
586591 < Box
@@ -598,7 +603,7 @@ function ColumnHeader<D extends Record<string, unknown>>({
598603 className = { [ columnHeader ( { withDividers, first, lastLeftSticky } ) ] }
599604 background = { config . headerBackgroundColor }
600605 color = { config . headerForegroundColor }
601- { ...column . getHeaderProps ( column . getSortByToggleProps ( ) ) }
606+ { ...headerProps }
602607 textAlign = { column . align }
603608 { ...config . padding . header }
604609 >
0 commit comments