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.
@@ -266,7 +266,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
|
|
266
266
|
? 'none'
|
267
267
|
: `padding 150ms ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
|
268
268
|
? tableCellProps.sx(theme)
|
269
|
-
: tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(
|
269
|
+
: tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_h = header === null || header === void 0 ? void 0 : header.id) !== null && _h !== void 0 ? _h : column.id)}-size) * 1px), ${(_j = column.columnDef.minSize) !== null && _j !== void 0 ? _j : 30}px)`, width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_k = header === null || header === void 0 ? void 0 : header.id) !== null && _k !== void 0 ? _k : column.id)}-size) * 1px)` }));
|
270
270
|
};
|
271
271
|
const MRT_DefaultColumn = {
|
272
272
|
filterVariant: 'text',
|
@@ -2671,9 +2671,9 @@ const MRT_Table = ({ table }) => {
|
|
2671
2671
|
const colSizes = {};
|
2672
2672
|
for (let i = 0; i < headers.length; i++) {
|
2673
2673
|
const header = headers[i];
|
2674
|
-
|
2675
|
-
colSizes[`--
|
2676
|
-
|
2674
|
+
colSizes[`--header-${parseCSSVarId(header.id)}-size`] = header.getSize();
|
2675
|
+
colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] =
|
2676
|
+
header.column.getSize();
|
2677
2677
|
}
|
2678
2678
|
return colSizes;
|
2679
2679
|
}, [columns, columnSizing, columnSizingInfo, columnVisibility]);
|