material-react-table 1.11.2 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2487,9 +2487,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2487
2487
|
rowRef.current = node;
|
2488
2488
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2489
2489
|
}
|
2490
|
-
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, top: virtualRow ? 0 : undefined,
|
2491
|
-
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2492
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', '&:hover td': {
|
2490
|
+
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), boxSizing: 'border-box', display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', top: virtualRow ? 0 : undefined, width: '100%', '&:hover td': {
|
2493
2491
|
backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2494
2492
|
? row.getIsSelected()
|
2495
2493
|
? `${alpha(theme.palette.primary.main, 0.2)}`
|
@@ -2499,7 +2497,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2499
2497
|
: undefined,
|
2500
2498
|
} }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
|
2501
2499
|
? tableRowProps.sx(theme)
|
2502
|
-
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)))
|
2500
|
+
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
|
2501
|
+
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2502
|
+
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }),
|
2503
2503
|
virtualPaddingLeft ? (React.createElement("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
|
2504
2504
|
(virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
|
2505
2505
|
const cell = columnVirtualizer
|
@@ -2577,7 +2577,7 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
|
|
2577
2577
|
pagination.pageSize,
|
2578
2578
|
]);
|
2579
2579
|
const rowVirtualizer = enableRowVirtualization
|
2580
|
-
? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current,
|
2580
|
+
? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, overscan: 4 }, vProps_old), vProps))
|
2581
2581
|
: undefined;
|
2582
2582
|
if (rowVirtualizerInstanceRef && rowVirtualizer) {
|
2583
2583
|
rowVirtualizerInstanceRef.current = rowVirtualizer;
|