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
package/src/column.utils.ts
CHANGED
@@ -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(
|
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(
|
313
|
+
width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
|
314
314
|
header?.id ?? column.id,
|
315
315
|
)}-size) * 1px)`,
|
316
316
|
});
|
package/src/table/MRT_Table.tsx
CHANGED
@@ -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
|
-
|
63
|
-
colSizes[`--
|
64
|
-
|
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]);
|