material-react-table 1.7.1 → 1.7.2

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.
@@ -243,7 +243,9 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
243
243
  : getIsFirstRightPinnedColumn(column)
244
244
  ? `4px 0 8px -6px ${alpha(theme.palette.common.black, 0.2)} inset`
245
245
  : undefined, display: table.options.layoutMode === 'grid' ? 'flex' : 'table-cell', flex: table.options.layoutMode === 'grid'
246
- ? `var(--col-${column.id.replaceAll('.', '_')}-size) 0 auto`
246
+ ? `var(--col-${column.id
247
+ .replaceAll('.', '_')
248
+ .replaceAll(' ', '_')}-size) 0 auto`
247
249
  : undefined, left: column.getIsPinned() === 'left'
248
250
  ? `${column.getStart('left')}px`
249
251
  : undefined, ml: table.options.enableColumnVirtualization &&
@@ -267,7 +269,11 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
267
269
  ? 'none'
268
270
  : `padding 150ms ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
269
271
  ? tableCellProps.sx(theme)
270
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${column.id.replaceAll('.', '_')}-size) * 1px), ${(_g = column.columnDef.minSize) !== null && _g !== void 0 ? _g : 30}px)`, width: `calc(var(--col-${column.id.replaceAll('.', '_')}-size) * 1px)` }));
272
+ : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${column.id
273
+ .replaceAll('.', '_')
274
+ .replaceAll(' ', '_')}-size) * 1px), ${(_g = column.columnDef.minSize) !== null && _g !== void 0 ? _g : 30}px)`, width: `calc(var(--col-${column.id
275
+ .replaceAll('.', '_')
276
+ .replaceAll(' ', '_')}-size) * 1px)` }));
271
277
  };
272
278
  const MRT_DefaultColumn = {
273
279
  filterVariant: 'text',
@@ -2632,7 +2638,7 @@ const MRT_Table = ({ table }) => {
2632
2638
  const colSizes = {};
2633
2639
  for (let i = 0; i < headers.length; i++) {
2634
2640
  const h = headers[i];
2635
- colSizes[`--col-${h.column.id}-size`.replaceAll('.', '_')] = h.getSize();
2641
+ colSizes[`--col-${h.column.id}-size`.replaceAll('.', '_').replaceAll(' ', '_')] = h.getSize();
2636
2642
  }
2637
2643
  return colSizes;
2638
2644
  }, [columns, columnSizing, columnSizingInfo]);