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/dist/cjs/index.js
CHANGED
@@ -343,7 +343,7 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
|
|
343
343
|
? 'none'
|
344
344
|
: `padding 150ms ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
|
345
345
|
? tableCellProps.sx(theme)
|
346
|
-
: tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(
|
346
|
+
: 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)` }));
|
347
347
|
};
|
348
348
|
const MRT_DefaultColumn = {
|
349
349
|
filterVariant: 'text',
|
@@ -2748,9 +2748,9 @@ const MRT_Table = ({ table }) => {
|
|
2748
2748
|
const colSizes = {};
|
2749
2749
|
for (let i = 0; i < headers.length; i++) {
|
2750
2750
|
const header = headers[i];
|
2751
|
-
|
2752
|
-
colSizes[`--
|
2753
|
-
|
2751
|
+
colSizes[`--header-${parseCSSVarId(header.id)}-size`] = header.getSize();
|
2752
|
+
colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] =
|
2753
|
+
header.column.getSize();
|
2754
2754
|
}
|
2755
2755
|
return colSizes;
|
2756
2756
|
}, [columns, columnSizing, columnSizingInfo, columnVisibility]);
|