material-react-table 1.8.3 → 1.8.4

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.3",
2
+ "version": "1.8.4",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -307,10 +307,10 @@ export const getCommonCellStyles = ({
307
307
  ...(tableCellProps?.sx instanceof Function
308
308
  ? tableCellProps.sx(theme)
309
309
  : (tableCellProps?.sx as any)),
310
- minWidth: `max(calc(var(--col-${parseCSSVarId(
310
+ minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
311
311
  header?.id ?? column.id,
312
312
  )}-size) * 1px), ${column.columnDef.minSize ?? 30}px)`,
313
- width: `calc(var(--col-${parseCSSVarId(
313
+ width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
314
314
  header?.id ?? column.id,
315
315
  )}-size) * 1px)`,
316
316
  });
@@ -59,9 +59,9 @@ export const MRT_Table = ({ table }: Props) => {
59
59
  const colSizes: { [key: string]: number } = {};
60
60
  for (let i = 0; i < headers.length; i++) {
61
61
  const header = headers[i];
62
- const colSize = header.getSize();
63
- colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize;
64
- colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize;
62
+ colSizes[`--header-${parseCSSVarId(header.id)}-size`] = header.getSize();
63
+ colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] =
64
+ header.column.getSize();
65
65
  }
66
66
  return colSizes;
67
67
  }, [columns, columnSizing, columnSizingInfo, columnVisibility]);