material-react-table-narender 2.13.33 → 2.13.35

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/index.js CHANGED
@@ -2512,7 +2512,7 @@ const MRT_TableDetailPanel = (_a) => {
2512
2512
  };
2513
2513
 
2514
2514
  const MRT_TableBodyRow = (_a) => {
2515
- var _b, _c, _d, _f;
2515
+ var _b, _c, _d, _f, _g;
2516
2516
  var { columnVirtualizer, numRows, pinnedRowIds, row, rowVirtualizer, staticRowIndex, table, virtualRow } = _a, rest = __rest(_a, ["columnVirtualizer", "numRows", "pinnedRowIds", "row", "rowVirtualizer", "staticRowIndex", "table", "virtualRow"]);
2517
2517
  const theme = styles.useTheme();
2518
2518
  const { getState, options: { enableRowOrdering, enableRowPinning, enableStickyFooter, enableStickyHeader, layoutMode, memoMode, mrtTheme: { baseBackgroundColor, pinnedRowBackgroundColor, selectedRowBackgroundColor, }, muiTableBodyRowProps, renderDetailPanel, rowPinningDisplayMode, }, refs: { tableFooterRef, tableHeadRef }, setHoveredRow, } = table;
@@ -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
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(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) => {
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)), children: [virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
2595
- let cell = cellOrVirtualCell;
2596
- if (columnVirtualizer) {
2597
- staticColumnIndex = cellOrVirtualCell.index;
2598
- cell = visibleCells[staticColumnIndex];
2599
- }
2600
- const props = {
2601
- cell,
2602
- numRows,
2603
- rowRef,
2604
- staticColumnIndex,
2605
- staticRowIndex,
2606
- table,
2607
- };
2608
- return cell ? (memoMode === 'cells' &&
2609
- cell.column.columnDef.columnDefType === 'data' &&
2610
- !draggingColumn &&
2611
- !draggingRow &&
2612
- (editingCell === null || editingCell === void 0 ? void 0 : editingCell.id) !== cell.id &&
2613
- (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;
2614
- }), 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 }))] }));
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: (_g = row === null || row === void 0 ? void 0 : row.original) === null || _g === void 0 ? void 0 : _g.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