material-react-table 1.5.8 → 1.5.10

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.
@@ -1558,8 +1558,8 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1558
1558
  setFilterValue('');
1559
1559
  column.setFilterValue(undefined);
1560
1560
  setColumnFilterFns((prev) => {
1561
- var _a, _b, _c;
1562
- return (Object.assign(Object.assign({}, prev), { [header.id]: (_c = (_b = (_a = columnDef.columnFilterModeOptions) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : columnFilterModeOptions === null || columnFilterModeOptions === void 0 ? void 0 : columnFilterModeOptions[0]) !== null && _c !== void 0 ? _c : 'fuzzy' }));
1561
+ var _a;
1562
+ return (Object.assign(Object.assign({}, prev), { [header.id]: (_a = allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions[0]) !== null && _a !== void 0 ? _a : 'fuzzy' }));
1563
1563
  });
1564
1564
  };
1565
1565
  const handleFilterMenuOpen = (event) => {
@@ -1603,7 +1603,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1603
1603
  },
1604
1604
  }, margin: "none", placeholder: filterChipLabel || isSelectFilter || isMultiSelectFilter
1605
1605
  ? undefined
1606
- : filterPlaceholder, onChange: handleChange, onClick: (e) => e.stopPropagation(), select: isSelectFilter || isMultiSelectFilter, value: filterValue, variant: "standard", InputProps: {
1606
+ : filterPlaceholder, onChange: handleChange, onClick: (e) => e.stopPropagation(), select: isSelectFilter || isMultiSelectFilter, value: filterValue !== null && filterValue !== void 0 ? filterValue : '', variant: "standard", InputProps: {
1607
1607
  startAdornment: showChangeModeButton ? (React.createElement(InputAdornment, { position: "start" },
1608
1608
  React.createElement(Tooltip, { arrow: true, title: localization.changeFilterMode },
1609
1609
  React.createElement("span", null,
@@ -1819,9 +1819,8 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1819
1819
  opacity: 1,
1820
1820
  },
1821
1821
  }), style: {
1822
- transform: column.getIsResizing()
1823
- ? `translateX(${((_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0) /
1824
- (columnResizeMode === 'onChange' ? 16 : 1)}px)`
1822
+ transform: column.getIsResizing() && columnResizeMode === 'onEnd'
1823
+ ? `translateX(${(_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0}px)`
1825
1824
  : undefined,
1826
1825
  } },
1827
1826
  React.createElement(Divider, { flexItem: true, orientation: "vertical", sx: {
@@ -2509,7 +2508,7 @@ const MRT_TableFooterRow = ({ footerGroup, table, virtualColumns, virtualPadding
2509
2508
  const tableRowProps = muiTableFooterRowProps instanceof Function
2510
2509
  ? muiTableFooterRowProps({ footerGroup, table })
2511
2510
  : muiTableFooterRowProps;
2512
- return (React.createElement(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'flex' : 'table-row', width: '100%' }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2511
+ return (React.createElement(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.04), display: layoutMode === 'grid' ? 'flex' : 'table-row', width: '100%' }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
2513
2512
  ? tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx(theme)
2514
2513
  : tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))) }),
2515
2514
  virtualPaddingLeft ? (React.createElement("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
@@ -2529,7 +2528,7 @@ const MRT_TableFooter = ({ table, virtualColumns, virtualPaddingLeft, virtualPad
2529
2528
  ? muiTableFooterProps({ table })
2530
2529
  : muiTableFooterProps;
2531
2530
  const stickFooter = (isFullScreen || enableStickyFooter) && enableStickyFooter !== false;
2532
- return (React.createElement(TableFooter, Object.assign({}, tableFooterProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), bottom: stickFooter ? 0 : undefined, display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: stickFooter ? 0.97 : undefined, outline: stickFooter
2531
+ return (React.createElement(TableFooter, Object.assign({}, tableFooterProps, { sx: (theme) => (Object.assign({ bottom: stickFooter ? 0 : undefined, display: layoutMode === 'grid' ? 'grid' : 'table-row-group', opacity: stickFooter ? 0.97 : undefined, outline: stickFooter
2533
2532
  ? theme.palette.mode === 'light'
2534
2533
  ? `1px solid ${theme.palette.grey[300]}`
2535
2534
  : `1px solid ${theme.palette.grey[700]}`
@@ -2595,7 +2594,7 @@ const MRT_Table = ({ table }) => {
2595
2594
  virtualPaddingLeft,
2596
2595
  virtualPaddingRight,
2597
2596
  };
2598
- return (React.createElement(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { sx: (theme) => (Object.assign({ display: layoutMode === 'grid' ? 'grid' : 'table', tableLayout: layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined }, ((tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) instanceof Function
2597
+ return (React.createElement(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: layoutMode === 'grid' ? 'grid' : 'table', tableLayout: layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined }, ((tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) instanceof Function
2599
2598
  ? tableProps.sx(theme)
2600
2599
  : tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx))) }),
2601
2600
  enableTableHead && React.createElement(MRT_TableHead, Object.assign({}, props)),