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.
package/dist/cjs/index.js
CHANGED
@@ -321,7 +321,9 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
|
|
321
321
|
: getIsFirstRightPinnedColumn(column)
|
322
322
|
? `4px 0 8px -6px ${styles.alpha(theme.palette.common.black, 0.2)} inset`
|
323
323
|
: undefined, display: table.options.layoutMode === 'grid' ? 'flex' : 'table-cell', flex: table.options.layoutMode === 'grid'
|
324
|
-
? `var(--col-${column.id
|
324
|
+
? `var(--col-${column.id
|
325
|
+
.replaceAll('.', '_')
|
326
|
+
.replaceAll(' ', '_')}-size) 0 auto`
|
325
327
|
: undefined, left: column.getIsPinned() === 'left'
|
326
328
|
? `${column.getStart('left')}px`
|
327
329
|
: undefined, ml: table.options.enableColumnVirtualization &&
|
@@ -345,7 +347,11 @@ const getCommonCellStyles = ({ column, table, tableCellProps, theme, }) => {
|
|
345
347
|
? 'none'
|
346
348
|
: `padding 150ms ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
|
347
349
|
? tableCellProps.sx(theme)
|
348
|
-
: tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${column.id
|
350
|
+
: tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { minWidth: `max(calc(var(--col-${column.id
|
351
|
+
.replaceAll('.', '_')
|
352
|
+
.replaceAll(' ', '_')}-size) * 1px), ${(_g = column.columnDef.minSize) !== null && _g !== void 0 ? _g : 30}px)`, width: `calc(var(--col-${column.id
|
353
|
+
.replaceAll('.', '_')
|
354
|
+
.replaceAll(' ', '_')}-size) * 1px)` }));
|
349
355
|
};
|
350
356
|
const MRT_DefaultColumn = {
|
351
357
|
filterVariant: 'text',
|
@@ -2710,7 +2716,7 @@ const MRT_Table = ({ table }) => {
|
|
2710
2716
|
const colSizes = {};
|
2711
2717
|
for (let i = 0; i < headers.length; i++) {
|
2712
2718
|
const h = headers[i];
|
2713
|
-
colSizes[`--col-${h.column.id}-size`.replaceAll('.', '_')] = h.getSize();
|
2719
|
+
colSizes[`--col-${h.column.id}-size`.replaceAll('.', '_').replaceAll(' ', '_')] = h.getSize();
|
2714
2720
|
}
|
2715
2721
|
return colSizes;
|
2716
2722
|
}, [columns, columnSizing, columnSizingInfo]);
|