material-react-table 1.5.6 → 1.5.7
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 +8 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/table/MRT_TableRoot.d.ts +1 -1
- package/dist/esm/material-react-table.esm.js +8 -6
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/table/MRT_TableRoot.d.ts +1 -1
- package/package.json +1 -1
- package/src/body/MRT_TableBodyRow.tsx +1 -1
- package/src/table/MRT_TableRoot.tsx +1 -1
- package/src/toolbar/MRT_BottomToolbar.tsx +7 -5
package/dist/cjs/index.js
CHANGED
@@ -1474,11 +1474,13 @@ const MRT_BottomToolbar = ({ table }) => {
|
|
1474
1474
|
? muiBottomToolbarProps({ table })
|
1475
1475
|
: muiBottomToolbarProps;
|
1476
1476
|
const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
|
1477
|
-
return (React__default["default"].createElement(Toolbar__default["default"], Object.assign({ variant: "dense" }, toolbarProps, { ref: (
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1477
|
+
return (React__default["default"].createElement(Toolbar__default["default"], Object.assign({ variant: "dense" }, toolbarProps, { ref: (node) => {
|
1478
|
+
if (node) {
|
1479
|
+
bottomToolbarRef.current = node;
|
1480
|
+
if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
|
1481
|
+
// @ts-ignore
|
1482
|
+
toolbarProps.ref.current = node;
|
1483
|
+
}
|
1482
1484
|
}
|
1483
1485
|
}, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, commonToolbarStyles({ theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${styles.alpha(theme.palette.common.black, 0.1)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), ((toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx) instanceof Function
|
1484
1486
|
? toolbarProps.sx(theme)
|
@@ -2448,7 +2450,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2448
2450
|
virtualPaddingRight ? (React__default["default"].createElement("td", { style: { display: 'flex', width: virtualPaddingRight } })) : null),
|
2449
2451
|
renderDetailPanel && !row.getIsGrouped() && (React__default["default"].createElement(MRT_TableDetailPanel, { parentRowRef: rowRef, row: row, table: table, virtualRow: virtualRow }))));
|
2450
2452
|
};
|
2451
|
-
const Memo_MRT_TableBodyRow = React.memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row);
|
2453
|
+
const Memo_MRT_TableBodyRow = React.memo(MRT_TableBodyRow, (prev, next) => (prev.row === next.row && prev.rowIndex === next.rowIndex));
|
2452
2454
|
|
2453
2455
|
const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
|
2454
2456
|
var _a, _b, _c;
|