@@ -1192,28 +1192,26 @@ export function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridPr
11921192 } ,
11931193 className
11941194 ) }
1195- style = {
1196- {
1197- ...style ,
1198- // set scrollPadding to correctly position non-sticky cells after scrolling
1199- scrollPaddingInlineStart :
1200- selectedPosition . idx > lastFrozenColumnIndex || scrollToPosition ?. idx !== undefined
1201- ? `${ totalFrozenColumnWidth } px`
1202- : undefined ,
1203- scrollPaddingBlock :
1204- isRowIdxWithinViewportBounds ( selectedPosition . rowIdx ) ||
1205- scrollToPosition ?. rowIdx !== undefined
1206- ? `${ headerRowsHeight + topSummaryRowsCount * summaryRowHeight } px ${
1207- bottomSummaryRowsCount * summaryRowHeight
1208- } px`
1209- : undefined ,
1210- gridTemplateColumns,
1211- gridTemplateRows : templateRows ,
1212- '--rdg-header-row-height' : `${ headerRowHeight } px` ,
1213- '--rdg-scroll-height' : `${ scrollHeight } px` ,
1214- ...layoutCssVars
1215- } as unknown as React . CSSProperties
1216- }
1195+ style = { {
1196+ ...style ,
1197+ // set scrollPadding to correctly position non-sticky cells after scrolling
1198+ scrollPaddingInlineStart :
1199+ selectedPosition . idx > lastFrozenColumnIndex || scrollToPosition ?. idx !== undefined
1200+ ? `${ totalFrozenColumnWidth } px`
1201+ : undefined ,
1202+ scrollPaddingBlock :
1203+ isRowIdxWithinViewportBounds ( selectedPosition . rowIdx ) ||
1204+ scrollToPosition ?. rowIdx !== undefined
1205+ ? `${ headerRowsHeight + topSummaryRowsCount * summaryRowHeight } px ${
1206+ bottomSummaryRowsCount * summaryRowHeight
1207+ } px`
1208+ : undefined ,
1209+ gridTemplateColumns,
1210+ gridTemplateRows : templateRows ,
1211+ '--rdg-header-row-height' : `${ headerRowHeight } px` ,
1212+ '--rdg-scroll-height' : `${ scrollHeight } px` ,
1213+ ...layoutCssVars
1214+ } }
12171215 dir = { direction }
12181216 ref = { gridRef }
12191217 onScroll = { handleScroll }
0 commit comments