material-react-table 1.13.1 → 1.15.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.
@@ -65,7 +65,9 @@ import Table from '@mui/material/Table';
65
65
  import TableHead from '@mui/material/TableHead';
66
66
  import TableRow from '@mui/material/TableRow';
67
67
  import TableCell from '@mui/material/TableCell';
68
- import { Stack, Slider, FormHelperText } from '@mui/material';
68
+ import Slider from '@mui/material/Slider';
69
+ import Stack from '@mui/material/Stack';
70
+ import FormHelperText from '@mui/material/FormHelperText';
69
71
  import Badge from '@mui/material/Badge';
70
72
  import TableSortLabel from '@mui/material/TableSortLabel';
71
73
  import TableBody from '@mui/material/TableBody';
@@ -75,7 +77,6 @@ import TableFooter from '@mui/material/TableFooter';
75
77
  import DialogActions from '@mui/material/DialogActions';
76
78
  import DialogContent from '@mui/material/DialogContent';
77
79
  import DialogTitle from '@mui/material/DialogTitle';
78
- import Stack$1 from '@mui/material/Stack';
79
80
 
80
81
  /******************************************************************************
81
82
  Copyright (c) Microsoft Corporation.
@@ -99,6 +100,10 @@ function __rest(s, e) {
99
100
  }
100
101
  return t;
101
102
  }
103
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
104
+ var e = new Error(message);
105
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
106
+ };
102
107
 
103
108
  const MRT_AggregationFns = Object.assign({}, aggregationFns);
104
109
 
@@ -784,6 +789,7 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
784
789
  const { column } = header;
785
790
  const { columnDef } = column;
786
791
  const { columnSizing, columnVisibility, density, showColumnFilters } = getState();
792
+ const columnFilterValue = column.getFilterValue();
787
793
  const [filterMenuAnchorEl, setFilterMenuAnchorEl] = useState(null);
788
794
  const handleClearSort = () => {
789
795
  column.clearSorting();
@@ -839,46 +845,63 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
839
845
  !isSelectFilter &&
840
846
  (allowedColumnFilterOptions === undefined ||
841
847
  !!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
842
- return (jsxs(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
843
- dense: density === 'compact',
844
- }, children: [(_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
845
- closeMenu: () => setAnchorEl(null),
846
- column,
847
- table,
848
- })) !== null && _c !== void 0 ? _c : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
849
- closeMenu: () => setAnchorEl(null),
850
- column,
851
- table,
852
- })) !== null && _d !== void 0 ? _d : (enableSorting &&
853
- column.getCanSort() &&
854
- [
855
- enableSortingRemoval !== false && (jsx(MenuItem, { disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ClearAllIcon, {}) }), localization.clearSort] }) }, 0)),
856
- jsx(MenuItem, { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }) }, 1),
857
- jsx(MenuItem, { divider: enableColumnFilters || enableGrouping || enableHiding, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, {}) }), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 2),
858
- ].filter(Boolean)), enableColumnFilters &&
859
- column.getCanFilter() &&
860
- [
861
- jsx(MenuItem, { disabled: !column.getFilterValue(), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 0),
862
- jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
863
- ? handleOpenFilterModeMenu
864
- : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsx(ArrowRightIcon, {}) }))] }, 1),
865
- showFilterModeSubMenu && (jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 2)),
866
- ].filter(Boolean), enableGrouping &&
867
- column.getCanGroup() && [
868
- jsx(MenuItem, { divider: enablePinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(DynamicFeedIcon, {}) }), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] }) }, 0),
869
- ], enablePinning &&
870
- column.getCanPin() && [
871
- jsx(MenuItem, { disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] }) }, 0),
872
- jsx(MenuItem, { disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] }) }, 1),
873
- jsx(MenuItem, { disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, {}) }), localization.unpin] }) }, 2),
874
- ], enableColumnResizing &&
875
- column.getCanResize() && [
876
- jsx(MenuItem, { disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(RestartAltIcon, {}) }), localization.resetColumnSize] }) }, 0),
877
- ], enableHiding && [
878
- jsx(MenuItem, { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(VisibilityOffIcon, {}) }), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 : _j.replace('{column}', String(columnDef.header))] }) }, 0),
848
+ const internalColumnMenuItems = [
849
+ ...(enableSorting && column.getCanSort()
850
+ ? [
851
+ enableSortingRemoval !== false && (jsx(MenuItem, { disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ClearAllIcon, {}) }), localization.clearSort] }) }, 0)),
852
+ jsx(MenuItem, { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_b = localization.sortByColumnAsc) === null || _b === void 0 ? void 0 : _b.replace('{column}', String(columnDef.header))] }) }, 1),
853
+ jsx(MenuItem, { divider: enableColumnFilters || enableGrouping || enableHiding, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(SortIcon, {}) }), (_c = localization.sortByColumnDesc) === null || _c === void 0 ? void 0 : _c.replace('{column}', String(columnDef.header))] }) }, 2),
854
+ ]
855
+ : []),
856
+ ...(enableColumnFilters && column.getCanFilter()
857
+ ? [
858
+ jsx(MenuItem, { disabled: !columnFilterValue ||
859
+ (Array.isArray(columnFilterValue) &&
860
+ !columnFilterValue.filter((value) => value).length), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 3),
861
+ jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
862
+ ? handleOpenFilterModeMenu
863
+ : handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(FilterListIcon, {}) }), (_d = localization.filterByColumn) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsx(ArrowRightIcon, {}) }))] }, 4),
864
+ showFilterModeSubMenu && (jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 5)),
865
+ ]
866
+ : []),
867
+ ...(enableGrouping && column.getCanGroup()
868
+ ? [
869
+ jsx(MenuItem, { divider: enablePinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(DynamicFeedIcon, {}) }), (_e = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }) }, 6),
870
+ ]
871
+ : []),
872
+ ...(enablePinning && column.getCanPin()
873
+ ? [
874
+ jsx(MenuItem, { disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] }) }, 7),
875
+ jsx(MenuItem, { disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] }) }, 8),
876
+ jsx(MenuItem, { disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(PushPinIcon, {}) }), localization.unpin] }) }, 9),
877
+ ]
878
+ : []),
879
+ ...(enableColumnResizing && column.getCanResize()
880
+ ? [
881
+ jsx(MenuItem, { disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(RestartAltIcon, {}) }), localization.resetColumnSize] }) }, 10),
882
+ ]
883
+ : []),
884
+ ...(enableHiding
885
+ ? [
886
+ jsx(MenuItem, { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(VisibilityOffIcon, {}) }), (_f = localization.hideColumn) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 11),
879
887
  jsx(MenuItem, { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
880
- .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ViewColumnIcon, {}) }), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 : _k.replace('{column}', String(columnDef.header))] }) }, 1),
881
- ]] }));
888
+ .length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxs(Box, { sx: commonListItemStyles, children: [jsx(ListItemIcon, { children: jsx(ViewColumnIcon, {}) }), (_g = localization.showAllColumns) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }) }, 12),
889
+ ]
890
+ : []),
891
+ ].filter(Boolean);
892
+ return (jsx(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
893
+ dense: density === 'compact',
894
+ }, children: (_k = (_j = (_h = columnDef.renderColumnActionsMenuItems) === null || _h === void 0 ? void 0 : _h.call(columnDef, {
895
+ closeMenu: () => setAnchorEl(null),
896
+ column,
897
+ internalColumnMenuItems,
898
+ table,
899
+ })) !== null && _j !== void 0 ? _j : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
900
+ closeMenu: () => setAnchorEl(null),
901
+ column,
902
+ internalColumnMenuItems,
903
+ table,
904
+ })) !== null && _k !== void 0 ? _k : internalColumnMenuItems }));
882
905
  };
883
906
 
884
907
  const MRT_RowActionMenu = ({ anchorEl, handleEdit, row, setAnchorEl, table, }) => {
@@ -1653,6 +1676,8 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1653
1676
  ? textFieldProps.sx(theme)
1654
1677
  : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))), children: [(isSelectFilter || isMultiSelectFilter) && (jsx(MenuItem, { divider: true, disabled: true, hidden: true, value: "", children: jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder }) })), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.map((option) => {
1655
1678
  var _a;
1679
+ if (!option)
1680
+ return '';
1656
1681
  let value;
1657
1682
  let text;
1658
1683
  if (typeof option !== 'object') {
@@ -1735,16 +1760,16 @@ const MRT_FilterRangeSlider = ({ header, table }) => {
1735
1760
  const sliderProps = Object.assign(Object.assign({}, mTableHeadCellFilterTextFieldProps), mcTableHeadCellFilterTextFieldProps);
1736
1761
  let [min, max] = sliderProps.min !== undefined && sliderProps.max !== undefined
1737
1762
  ? [sliderProps.min, sliderProps.max]
1738
- : (_a = column.getFacetedMinMaxValues()) !== null && _a !== void 0 ? _a : [0, 0];
1739
- // column.getFacetedMinMaxValues() seems to return an array of arrays for the min value
1740
- // under some conditions, so check for that and take the first array value if that happens.
1741
- // To be a bit defensive, implement the same check for max, just in case.
1742
- if (Array.isArray(min)) {
1763
+ : (_a = column.getFacetedMinMaxValues()) !== null && _a !== void 0 ? _a : [0, 1];
1764
+ //fix potential TanStack Table bugs where min or max is an array
1765
+ if (Array.isArray(min))
1743
1766
  min = min[0];
1744
- }
1745
- if (Array.isArray(max)) {
1767
+ if (Array.isArray(max))
1746
1768
  max = max[0];
1747
- }
1769
+ if (min === null)
1770
+ min = 0;
1771
+ if (max === null)
1772
+ max = 1;
1748
1773
  const [filterValues, setFilterValues] = useState([min, max]);
1749
1774
  const columnFilterValue = column.getFilterValue();
1750
1775
  const isMounted = useRef(false);
@@ -1754,20 +1779,23 @@ const MRT_FilterRangeSlider = ({ header, table }) => {
1754
1779
  setFilterValues([min, max]);
1755
1780
  }
1756
1781
  else if (Array.isArray(columnFilterValue)) {
1757
- if (columnFilterValue[0] <= min && columnFilterValue[1] >= max) {
1758
- column.setFilterValue(undefined);
1759
- }
1760
- else {
1761
- setFilterValues(columnFilterValue);
1762
- }
1782
+ setFilterValues(columnFilterValue);
1763
1783
  }
1764
1784
  }
1765
1785
  isMounted.current = true;
1766
- }, [column.getFilterValue()]);
1767
- return (jsxs(Stack, { children: [jsx(Slider, Object.assign({ disableSwap: true, min: min, max: max, onChange: (_event, value) => {
1768
- setFilterValues(value);
1786
+ }, [columnFilterValue, min, max]);
1787
+ return (jsxs(Stack, { children: [jsx(Slider, Object.assign({ disableSwap: true, min: min, max: max, onChange: (_event, values) => {
1788
+ setFilterValues(values);
1769
1789
  }, onChangeCommitted: (_event, value) => {
1770
- column.setFilterValue(value);
1790
+ if (Array.isArray(value)) {
1791
+ if (value[0] <= min && value[1] >= max) {
1792
+ //if the user has selected the entire range, remove the filter
1793
+ column.setFilterValue(undefined);
1794
+ }
1795
+ else {
1796
+ column.setFilterValue(value);
1797
+ }
1798
+ }
1771
1799
  }, value: filterValues, valueLabelDisplay: "auto" }, sliderProps, { slotProps: {
1772
1800
  input: {
1773
1801
  ref: (node) => {
@@ -1805,18 +1833,18 @@ const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
1805
1833
  };
1806
1834
 
1807
1835
  const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1808
- var _a, _b, _c;
1836
+ var _a, _b, _c, _d;
1809
1837
  const { options: { icons: { FilterAltIcon }, localization, }, refs: { filterInputRefs }, setShowColumnFilters, } = table;
1810
1838
  const { column } = header;
1811
1839
  const { columnDef } = column;
1812
- const isRangeFilter = columnDef.filterVariant === 'range' ||
1840
+ const isRangeFilter = ['range', 'ranger-slider'].includes((_a = columnDef.filterVariant) !== null && _a !== void 0 ? _a : '') ||
1813
1841
  ['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn);
1814
1842
  const currentFilterOption = columnDef._filterFn;
1815
1843
  const filterTooltip = localization.filteringByColumn
1816
1844
  .replace('{column}', String(columnDef.header))
1817
1845
  .replace('{filterType}',
1818
1846
  // @ts-ignore
1819
- localization[`filter${((_a = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()) +
1847
+ localization[`filter${((_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
1820
1848
  (currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`])
1821
1849
  .replace('{filterValue}', `"${Array.isArray(column.getFilterValue())
1822
1850
  ? column.getFilterValue().join(`" ${isRangeFilter ? localization.and : localization.or} "`)
@@ -1824,7 +1852,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1824
1852
  .replace('" "', '');
1825
1853
  return (jsx(Grow, { unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
1826
1854
  (isRangeFilter && // @ts-ignore
1827
- (!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))), children: jsx(Box, { component: "span", sx: { flex: '0 0' }, children: jsx(Tooltip, { arrow: true, placement: "top", title: filterTooltip, children: jsx(IconButton, { disableRipple: true, onClick: (event) => {
1855
+ (!!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[0]) || !!((_d = column.getFilterValue()) === null || _d === void 0 ? void 0 : _d[1]))), children: jsx(Box, { component: "span", sx: { flex: '0 0' }, children: jsx(Tooltip, { arrow: true, placement: "top", title: filterTooltip, children: jsx(IconButton, { disableRipple: true, onClick: (event) => {
1828
1856
  setShowColumnFilters(true);
1829
1857
  queueMicrotask(() => {
1830
1858
  var _a, _b;
@@ -2414,7 +2442,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
2414
2442
  table,
2415
2443
  theme,
2416
2444
  tableCellProps,
2417
- })), draggingBorders)), children: jsxs(Fragment, { children: [cell.getIsPlaceholder() ? ((_b = (_a = columnDef.PlaceholderCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) !== null && _b !== void 0 ? _b : null) : isLoading || showSkeletons ? (jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2445
+ })), draggingBorders)), children: jsxs(Fragment, { children: [cell.getIsPlaceholder() ? ((_b = (_a = columnDef.PlaceholderCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) !== null && _b !== void 0 ? _b : null) : (isLoading || showSkeletons) && cell.getValue() === null ? (jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2418
2446
  rowNumberMode === 'static' &&
2419
2447
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsx(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
2420
2448
  (column.id === 'mrt-row-select' ||
@@ -2828,7 +2856,7 @@ const MRT_TablePaper = ({ table }) => {
2828
2856
 
2829
2857
  const MRT_EditRowModal = ({ open, row, table, }) => {
2830
2858
  const { options: { localization }, } = table;
2831
- return (jsxs(Dialog, { open: open, children: [jsx(DialogTitle, { textAlign: "center", children: localization.edit }), jsx(DialogContent, { children: jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsx(Stack$1, { sx: {
2859
+ return (jsxs(Dialog, { open: open, children: [jsx(DialogTitle, { textAlign: "center", children: localization.edit }), jsx(DialogContent, { children: jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsx(Stack, { sx: {
2832
2860
  gap: '1.5rem',
2833
2861
  minWidth: { xs: '300px', sm: '360px', md: '400px' },
2834
2862
  pt: '1rem',