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.
package/dist/cjs/index.js
CHANGED
@@ -2565,9 +2565,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2565
2565
|
rowRef.current = node;
|
2566
2566
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2567
2567
|
}
|
2568
|
-
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.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,
|
2569
|
-
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2570
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', '&:hover td': {
|
2568
|
+
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.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': {
|
2571
2569
|
backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2572
2570
|
? row.getIsSelected()
|
2573
2571
|
? `${styles.alpha(theme.palette.primary.main, 0.2)}`
|
@@ -2577,7 +2575,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2577
2575
|
: undefined,
|
2578
2576
|
} }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
|
2579
2577
|
? tableRowProps.sx(theme)
|
2580
|
-
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)))
|
2578
|
+
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
|
2579
|
+
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2580
|
+
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }),
|
2581
2581
|
virtualPaddingLeft ? (React__default["default"].createElement("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
|
2582
2582
|
(virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
|
2583
2583
|
const cell = columnVirtualizer
|
@@ -2655,7 +2655,7 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
|
|
2655
2655
|
pagination.pageSize,
|
2656
2656
|
]);
|
2657
2657
|
const rowVirtualizer = enableRowVirtualization
|
2658
|
-
? reactVirtual.useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current,
|
2658
|
+
? reactVirtual.useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, overscan: 4 }, vProps_old), vProps))
|
2659
2659
|
: undefined;
|
2660
2660
|
if (rowVirtualizerInstanceRef && rowVirtualizer) {
|
2661
2661
|
rowVirtualizerInstanceRef.current = rowVirtualizer;
|