material-react-table 2.12.1 → 2.13.0

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/index.js CHANGED
@@ -54,6 +54,7 @@ var ViewColumnIcon = require('@mui/icons-material/ViewColumn');
54
54
  var VisibilityOffIcon = require('@mui/icons-material/VisibilityOff');
55
55
  var reactVirtual = require('@tanstack/react-virtual');
56
56
  var Paper = require('@mui/material/Paper');
57
+ var material = require('@mui/material');
57
58
  var TableContainer = require('@mui/material/TableContainer');
58
59
  var Table = require('@mui/material/Table');
59
60
  var TableBody = require('@mui/material/TableBody');
@@ -747,7 +748,7 @@ const MRT_EditActionButtons = (_a) => {
747
748
  }
748
749
  };
749
750
  return (jsxRuntime.jsx(Box__default["default"], { onClick: (e) => e.stopPropagation(), sx: (theme) => (Object.assign({ display: 'flex', gap: '0.75rem' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: variant === 'icon' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip__default["default"], { title: localization.cancel, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.cancel, onClick: handleCancel, children: jsxRuntime.jsx(CancelIcon, {}) }) }), ((isCreating && onCreatingRowSave) ||
750
- (isEditing && onEditingRowSave)) && (jsxRuntime.jsx(Tooltip__default["default"], { title: localization.save, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.save, color: "info", onClick: handleSubmitRow, children: isSaving ? jsxRuntime.jsx(CircularProgress__default["default"], { size: 18 }) : jsxRuntime.jsx(SaveIcon, {}) }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button__default["default"], { onClick: handleCancel, sx: { minWidth: '100px' }, children: localization.cancel }), jsxRuntime.jsxs(Button__default["default"], { onClick: handleSubmitRow, sx: { minWidth: '100px' }, variant: "contained", children: [isSaving && jsxRuntime.jsx(CircularProgress__default["default"], { color: "inherit", size: 18 }), localization.save] })] })) }));
751
+ (isEditing && onEditingRowSave)) && (jsxRuntime.jsx(Tooltip__default["default"], { title: localization.save, children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.save, color: "info", disabled: isSaving, onClick: handleSubmitRow, children: isSaving ? jsxRuntime.jsx(CircularProgress__default["default"], { size: 18 }) : jsxRuntime.jsx(SaveIcon, {}) }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button__default["default"], { onClick: handleCancel, sx: { minWidth: '100px' }, children: localization.cancel }), jsxRuntime.jsxs(Button__default["default"], { disabled: isSaving, onClick: handleSubmitRow, sx: { minWidth: '100px' }, variant: "contained", children: [isSaving && jsxRuntime.jsx(CircularProgress__default["default"], { color: "inherit", size: 18 }), localization.save] })] })) }));
751
752
  };
752
753
 
753
754
  const parseCSSVarId = (id) => id.replace(/[^a-zA-Z0-9]/g, '_');
@@ -1416,11 +1417,12 @@ const useMRT_TableOptions = (_a) => {
1416
1417
  ? reactTable.getFacetedMinMaxValues()
1417
1418
  : undefined, getFacetedRowModel: enableFacetedValues ? reactTable.getFacetedRowModel() : undefined, getFacetedUniqueValues: enableFacetedValues
1418
1419
  ? reactTable.getFacetedUniqueValues()
1419
- : undefined, getFilteredRowModel: enableColumnFilters || enableGlobalFilter || enableFilters
1420
+ : undefined, getFilteredRowModel: (enableColumnFilters || enableGlobalFilter || enableFilters) &&
1421
+ !manualFiltering
1420
1422
  ? reactTable.getFilteredRowModel()
1421
- : undefined, getGroupedRowModel: enableGrouping ? reactTable.getGroupedRowModel() : undefined, getPaginationRowModel: enablePagination
1423
+ : undefined, getGroupedRowModel: enableGrouping && !manualGrouping ? reactTable.getGroupedRowModel() : undefined, getPaginationRowModel: enablePagination && !manualPagination
1422
1424
  ? reactTable.getPaginationRowModel()
1423
- : undefined, getSortedRowModel: enableSorting ? reactTable.getSortedRowModel() : undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, icons,
1425
+ : undefined, getSortedRowModel: enableSorting && !manualSorting ? reactTable.getSortedRowModel() : undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, icons,
1424
1426
  layoutMode,
1425
1427
  localization,
1426
1428
  manualFiltering,
@@ -4185,6 +4187,7 @@ const MRT_TablePaper = (_a) => {
4185
4187
  const { getState, options: { enableBottomToolbar, enableTopToolbar, mrtTheme: { baseBackgroundColor }, muiTablePaperProps, renderBottomToolbar, renderTopToolbar, }, refs: { tablePaperRef }, } = table;
4186
4188
  const { isFullScreen } = getState();
4187
4189
  const paperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
4190
+ const theme = material.useTheme();
4188
4191
  return (jsxRuntime.jsxs(Paper__default["default"], Object.assign({ elevation: 2 }, paperProps, { ref: (ref) => {
4189
4192
  tablePaperRef.current = ref;
4190
4193
  if (paperProps === null || paperProps === void 0 ? void 0 : paperProps.ref) {
@@ -4204,7 +4207,7 @@ const MRT_TablePaper = (_a) => {
4204
4207
  right: 0,
4205
4208
  top: 0,
4206
4209
  width: '100dvw',
4207
- zIndex: 999,
4210
+ zIndex: theme.zIndex.modal,
4208
4211
  }
4209
4212
  : {})), paperProps === null || paperProps === void 0 ? void 0 : paperProps.style), sx: (theme) => (Object.assign({ backgroundColor: baseBackgroundColor, backgroundImage: 'unset', overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx, theme))), children: [enableTopToolbar &&
4210
4213
  ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&