material-react-table-narender 2.13.33 → 2.13.34
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +27 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +26 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/body/MRT_TableBodyRow.tsx +3 -0
package/dist/index.js
CHANGED
@@ -2570,7 +2570,8 @@ const MRT_TableBodyRow = (_a) => {
|
|
2570
2570
|
? `${styles.lighten(baseBackgroundColor, 0.3)}`
|
2571
2571
|
: `${styles.darken(baseBackgroundColor, 0.3)}`
|
2572
2572
|
: undefined;
|
2573
|
-
|
2573
|
+
console.log('row.id', row);
|
2574
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [react.createElement(TableRow__default["default"], Object.assign({ "data-index": renderDetailPanel ? staticRowIndex * 2 : staticRowIndex, "data-pinned": !!isRowPinned || undefined, "data-selected": isRowSelected || undefined, onDragEnter: handleDragEnter, onDragOver: handleDragOver, ref: (node) => {
|
2574
2575
|
if (node) {
|
2575
2576
|
rowRef.current = node;
|
2576
2577
|
rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement(node);
|
@@ -2591,27 +2592,30 @@ const MRT_TableBodyRow = (_a) => {
|
|
2591
2592
|
: topPinnedIndex !== undefined && isRowPinned
|
2592
2593
|
? `${topPinnedIndex * rowHeight +
|
2593
2594
|
(enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}px`
|
2594
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned ? 2 : 0 }, sx)),
|
2595
|
-
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2595
|
+
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned ? 2 : 0 }, sx)), key: row.id }),
|
2596
|
+
virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
|
2597
|
+
(virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
|
2598
|
+
let cell = cellOrVirtualCell;
|
2599
|
+
if (columnVirtualizer) {
|
2600
|
+
staticColumnIndex = cellOrVirtualCell.index;
|
2601
|
+
cell = visibleCells[staticColumnIndex];
|
2602
|
+
}
|
2603
|
+
const props = {
|
2604
|
+
cell,
|
2605
|
+
numRows,
|
2606
|
+
rowRef,
|
2607
|
+
staticColumnIndex,
|
2608
|
+
staticRowIndex,
|
2609
|
+
table,
|
2610
|
+
};
|
2611
|
+
return cell ? (memoMode === 'cells' &&
|
2612
|
+
cell.column.columnDef.columnDefType === 'data' &&
|
2613
|
+
!draggingColumn &&
|
2614
|
+
!draggingRow &&
|
2615
|
+
(editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
|
2616
|
+
(editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) !== row.id ? (jsxRuntime.jsx(Memo_MRT_TableBodyCell, Object.assign({}, props), cell.id)) : (jsxRuntime.jsx(MRT_TableBodyCell, Object.assign({}, props), cell.id))) : null;
|
2617
|
+
}),
|
2618
|
+
virtualPaddingRight ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingRight } })) : null), renderDetailPanel && !row.getIsGrouped() && (jsxRuntime.jsx(MRT_TableDetailPanel, { parentRowRef: rowRef, row: row, rowVirtualizer: rowVirtualizer, staticRowIndex: staticRowIndex, table: table, virtualRow: virtualRow }))] }));
|
2615
2619
|
};
|
2616
2620
|
const Memo_MRT_TableBodyRow = react.memo(MRT_TableBodyRow, (prev, next) => prev.row === next.row && prev.staticRowIndex === next.staticRowIndex);
|
2617
2621
|
|