material-react-table 1.0.0-beta.3 → 1.0.0-beta.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.
@@ -1,5 +1,6 @@
1
1
  import { ColumnOrderState, GroupingState } from '@tanstack/react-table';
2
- import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_DisplayColumnIds, MRT_FilterOption } from '.';
2
+ import { TableCellProps, Theme } from '@mui/material';
3
+ import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_DisplayColumnIds, MRT_FilterOption, MRT_Header, MRT_TableInstance } from '.';
3
4
  import { MRT_FilterFns } from './filterFns';
4
5
  import { MRT_SortingFns } from './sortingFns';
5
6
  export declare const getColumnId: <TData extends Record<string, any> = {}>(columnDef: MRT_ColumnDef<TData>) => string;
@@ -92,3 +93,13 @@ export declare const getLeadingDisplayColumnIds: <TData extends Record<string, a
92
93
  export declare const getTrailingDisplayColumnIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => (string | false | undefined)[];
93
94
  export declare const getDefaultColumnOrderIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => string[];
94
95
  export declare const getDefaultColumnFilterFn: <TData extends Record<string, any> = {}>(columnDef: MRT_ColumnDef<TData>) => MRT_FilterOption;
96
+ export declare const getIsLastLeftPinnedColumn: (table: MRT_TableInstance, column: MRT_Column) => boolean;
97
+ export declare const getIsFirstRightPinnedColumn: (column: MRT_Column) => boolean;
98
+ export declare const getTotalRight: (table: MRT_TableInstance, column: MRT_Column) => number;
99
+ export declare const getCommonCellStyles: ({ column, header, table, tableCellProps, theme, }: {
100
+ column: MRT_Column;
101
+ header?: MRT_Header<{}> | undefined;
102
+ table: MRT_TableInstance;
103
+ tableCellProps: TableCellProps;
104
+ theme: Theme;
105
+ }) => any;
package/dist/cjs/index.js CHANGED
@@ -595,6 +595,37 @@ const getDefaultColumnFilterFn = (columnDef) => {
595
595
  return 'betweenInclusive';
596
596
  return 'fuzzy';
597
597
  };
598
+ const getIsLastLeftPinnedColumn = (table, column) => {
599
+ return (column.getIsPinned() === 'left' &&
600
+ table.getLeftLeafHeaders().length - 1 === column.getPinnedIndex());
601
+ };
602
+ const getIsFirstRightPinnedColumn = (column) => {
603
+ return column.getIsPinned() === 'right' && column.getPinnedIndex() === 0;
604
+ };
605
+ const getTotalRight = (table, column) => {
606
+ return ((table.getRightLeafHeaders().length - 1 - column.getPinnedIndex()) * 160);
607
+ };
608
+ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
609
+ var _a, _b, _c, _d;
610
+ return (Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
611
+ ? material.alpha(material.lighten(theme.palette.background.default, 0.04), 0.95)
612
+ : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
613
+ ? `-4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
614
+ : getIsFirstRightPinnedColumn(column)
615
+ ? `4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
616
+ : undefined, left: column.getIsPinned() === 'left'
617
+ ? `${column.getStart('left')}px`
618
+ : undefined, opacity: ((_a = table.getState().draggingColumn) === null || _a === void 0 ? void 0 : _a.id) === column.id ||
619
+ ((_b = table.getState().hoveredColumn) === null || _b === void 0 ? void 0 : _b.id) === column.id
620
+ ? 0.5
621
+ : 1, position: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
622
+ ? 'sticky'
623
+ : undefined, right: column.getIsPinned() === 'right'
624
+ ? `${getTotalRight(table, column)}px`
625
+ : undefined, transition: `all ${column.getIsResizing() ? 0 : '0.2s'} ease-in-out` }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
626
+ ? tableCellProps.sx(theme)
627
+ : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), { maxWidth: `min(${column.getSize()}px, fit-content)`, minWidth: `max(${column.getSize()}px, ${(_c = column.columnDef.minSize) !== null && _c !== void 0 ? _c : 30}px)`, width: (_d = header === null || header === void 0 ? void 0 : header.getSize()) !== null && _d !== void 0 ? _d : column.getSize() }));
628
+ };
598
629
 
599
630
  const MRT_ShowHideColumnsMenuItems = ({ allColumns, hoveredColumn, setHoveredColumn, column, isSubMenu, table, }) => {
600
631
  var _a;
@@ -1090,7 +1121,7 @@ const MRT_TablePagination = ({ table, position }) => {
1090
1121
 
1091
1122
  const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
1092
1123
  var _a, _b;
1093
- const { getPrePaginationRowModel, getSelectedRowModel, getState, options: { localization, muiToolbarAlertBannerProps, muiToolbarAlertBannerChipProps, }, } = table;
1124
+ const { getPrePaginationRowModel, getSelectedRowModel, getState, options: { localization, muiToolbarAlertBannerProps, muiToolbarAlertBannerChipProps, positionToolbarAlertBanner, }, } = table;
1094
1125
  const { grouping, showAlertBanner } = getState();
1095
1126
  const alertProps = muiToolbarAlertBannerProps instanceof Function
1096
1127
  ? muiToolbarAlertBannerProps({ table })
@@ -1108,7 +1139,11 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
1108
1139
  index > 0 ? localization.thenBy : '',
1109
1140
  React__default["default"].createElement(material.Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))))))) : null;
1110
1141
  return (React__default["default"].createElement(material.Collapse, { in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0 },
1111
- React__default["default"].createElement(material.Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', right: 0, top: 0, width: '100%', zIndex: 2 }, ((alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx) instanceof Function
1142
+ React__default["default"].createElement(material.Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', mb: stackAlertBanner
1143
+ ? 0
1144
+ : positionToolbarAlertBanner === 'bottom'
1145
+ ? '-1rem'
1146
+ : undefined, right: 0, top: 0, width: '100%', zIndex: 2 }, ((alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx) instanceof Function
1112
1147
  ? alertProps.sx(theme)
1113
1148
  : alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx))) }),
1114
1149
  (alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && React__default["default"].createElement(material.AlertTitle, null, alertProps.title),
@@ -1302,10 +1337,10 @@ const MRT_BottomToolbar = ({ table }) => {
1302
1337
  ? toolbarProps.sx(theme)
1303
1338
  : toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx))) }),
1304
1339
  React__default["default"].createElement(MRT_LinearProgressBar, { isTopToolbar: false, table: table }),
1305
- positionToolbarAlertBanner === 'bottom' && (React__default["default"].createElement(MRT_ToolbarAlertBanner, { table: table })),
1340
+ positionToolbarAlertBanner === 'bottom' && (React__default["default"].createElement(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })),
1306
1341
  ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (React__default["default"].createElement(MRT_ToolbarDropZone, { table: table })),
1307
1342
  React__default["default"].createElement(material.Box, { sx: {
1308
- alignItems: 'flex-start',
1343
+ alignItems: 'center',
1309
1344
  boxSizing: 'border-box',
1310
1345
  display: 'flex',
1311
1346
  justifyContent: 'space-between',
@@ -1688,7 +1723,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table }) => {
1688
1723
  const MRT_TableHeadCell = ({ header, table }) => {
1689
1724
  var _a, _b, _c, _d;
1690
1725
  const theme = material.useTheme();
1691
- const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableColumnResizing, enableGrouping, enableMultiSort, muiTableHeadCellProps, }, setHoveredColumn, } = table;
1726
+ const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, muiTableHeadCellProps, }, setHoveredColumn, } = table;
1692
1727
  const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
1693
1728
  const { column } = header;
1694
1729
  const { columnDef } = column;
@@ -1700,16 +1735,6 @@ const MRT_TableHeadCell = ({ header, table }) => {
1700
1735
  ? columnDef.muiTableHeadCellProps({ column, table })
1701
1736
  : columnDef.muiTableHeadCellProps;
1702
1737
  const tableCellProps = Object.assign(Object.assign({}, mTableHeadCellProps), mcTableHeadCellProps);
1703
- const getIsLastLeftPinnedColumn = () => {
1704
- return (column.getIsPinned() === 'left' &&
1705
- table.getLeftLeafHeaders().length - 1 === column.getPinnedIndex());
1706
- };
1707
- const getIsFirstRightPinnedColumn = () => {
1708
- return column.getIsPinned() === 'right' && column.getPinnedIndex() === 0;
1709
- };
1710
- const getTotalRight = () => {
1711
- return ((table.getRightLeafHeaders().length - 1 - column.getPinnedIndex()) * 160);
1712
- };
1713
1738
  const handleDragEnter = (_e) => {
1714
1739
  if (enableGrouping && (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone') {
1715
1740
  setHoveredColumn(null);
@@ -1738,44 +1763,33 @@ const MRT_TableHeadCell = ({ header, table }) => {
1738
1763
  })
1739
1764
  : columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header)) !== null && _b !== void 0 ? _b : columnDef.header);
1740
1765
  const tableHeadCellRef = React__default["default"].useRef(null);
1741
- return (React__default["default"].createElement(material.TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: tableHeadCellRef }, tableCellProps, { sx: (theme) => {
1742
- var _a;
1743
- return (Object.assign(Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && columnDefType !== 'group'
1744
- ? material.alpha(material.lighten(theme.palette.background.default, 0.04), 0.95)
1745
- : 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn()
1746
- ? `-4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
1747
- : getIsFirstRightPinnedColumn()
1748
- ? `4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
1749
- : undefined, fontWeight: 'bold', left: column.getIsPinned() === 'left'
1750
- ? `${column.getStart('left')}px`
1751
- : undefined, overflow: 'visible', opacity: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id || (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
1752
- ? 0.5
1753
- : 1, p: density === 'compact'
1754
- ? '0.5rem'
1755
- : density === 'comfortable'
1756
- ? columnDefType === 'display'
1757
- ? '0.75rem'
1758
- : '1rem'
1759
- : columnDefType === 'display'
1760
- ? '1rem 1.25rem'
1761
- : '1.5rem', pb: columnDefType === 'display'
1762
- ? 0
1763
- : showColumnFilters || density === 'compact'
1764
- ? '0.4rem'
1765
- : '0.6rem', position: column.getIsPinned() && columnDefType !== 'group'
1766
- ? 'sticky'
1767
- : undefined, pt: columnDefType === 'group' || density === 'compact'
1768
- ? '0.25rem'
1769
- : density === 'comfortable'
1770
- ? '.75rem'
1771
- : '1.25rem', right: column.getIsPinned() === 'right' ? `${getTotalRight()}px` : undefined, transition: `all ${enableColumnResizing ? 0 : '0.2s'} ease-in-out`, userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top', zIndex: column.getIsResizing() || (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
1772
- ? 3
1773
- : column.getIsPinned() && columnDefType !== 'group'
1774
- ? 2
1775
- : 1 }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
1776
- ? tableCellProps.sx(theme)
1777
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), draggingBorders), { maxWidth: `min(${column.getSize()}px, fit-content)`, minWidth: `max(${column.getSize()}px, ${(_a = columnDef.minSize) !== null && _a !== void 0 ? _a : 30}px)`, width: header.getSize() }));
1778
- } }),
1766
+ return (React__default["default"].createElement(material.TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: tableHeadCellRef }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ fontWeight: 'bold', overflow: 'visible', p: density === 'compact'
1767
+ ? '0.5rem'
1768
+ : density === 'comfortable'
1769
+ ? columnDefType === 'display'
1770
+ ? '0.75rem'
1771
+ : '1rem'
1772
+ : columnDefType === 'display'
1773
+ ? '1rem 1.25rem'
1774
+ : '1.5rem', pb: columnDefType === 'display'
1775
+ ? 0
1776
+ : showColumnFilters || density === 'compact'
1777
+ ? '0.4rem'
1778
+ : '0.6rem', pt: columnDefType === 'group' || density === 'compact'
1779
+ ? '0.25rem'
1780
+ : density === 'comfortable'
1781
+ ? '.75rem'
1782
+ : '1.25rem', userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top', zIndex: column.getIsResizing() || (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
1783
+ ? 3
1784
+ : column.getIsPinned() && columnDefType !== 'group'
1785
+ ? 2
1786
+ : 1 }, getCommonCellStyles({
1787
+ column,
1788
+ header,
1789
+ table,
1790
+ tableCellProps,
1791
+ theme,
1792
+ })), draggingBorders)) }),
1779
1793
  header.isPlaceholder ? null : (React__default["default"].createElement(material.Box, { sx: {
1780
1794
  alignItems: 'flex-start',
1781
1795
  display: 'flex',
@@ -2023,16 +2037,6 @@ const MRT_TableBodyCell = ({ cell, enableHover, rowIndex, rowRef, table, }) => {
2023
2037
  });
2024
2038
  }
2025
2039
  };
2026
- const getIsLastLeftPinnedColumn = () => {
2027
- return (column.getIsPinned() === 'left' &&
2028
- table.getLeftLeafHeaders().length - 1 === column.getPinnedIndex());
2029
- };
2030
- const getIsFirstRightPinnedColumn = () => {
2031
- return column.getIsPinned() === 'right' && column.getPinnedIndex() === 0;
2032
- };
2033
- const getTotalRight = () => {
2034
- return ((table.getRightLeafHeaders().length - 1 - column.getPinnedIndex()) * 160);
2035
- };
2036
2040
  const handleDragEnter = (e) => {
2037
2041
  var _a;
2038
2042
  (_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onDragEnter) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, e);
@@ -2061,48 +2065,33 @@ const MRT_TableBodyCell = ({ cell, enableHover, rowIndex, rowRef, table, }) => {
2061
2065
  : undefined,
2062
2066
  }
2063
2067
  : undefined;
2064
- return (React__default["default"].createElement(material.TableCell, Object.assign({}, tableCellProps, { onDragEnter: handleDragEnter, onDoubleClick: handleDoubleClick, sx: (theme) => {
2065
- var _a;
2066
- return (Object.assign(Object.assign(Object.assign({ backgroundColor: column.getIsPinned()
2067
- ? material.alpha(material.lighten(theme.palette.background.default, 0.04), 0.95)
2068
- : undefined, boxShadow: getIsLastLeftPinnedColumn()
2069
- ? `-4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
2070
- : getIsFirstRightPinnedColumn()
2071
- ? `4px 0 8px -6px ${material.alpha(theme.palette.common.black, 0.2)} inset`
2072
- : undefined, cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text', left: column.getIsPinned() === 'left'
2073
- ? `${column.getStart('left')}px`
2074
- : undefined, opacity: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id || (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2075
- ? 0.5
2076
- : 1, overflow: 'hidden', p: density === 'compact'
2068
+ return (React__default["default"].createElement(material.TableCell, Object.assign({}, tableCellProps, { onDragEnter: handleDragEnter, onDoubleClick: handleDoubleClick, sx: (theme) => (Object.assign(Object.assign({ cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text', overflow: 'hidden', p: density === 'compact'
2069
+ ? columnDefType === 'display'
2070
+ ? '0 0.5rem'
2071
+ : '0.5rem'
2072
+ : density === 'comfortable'
2077
2073
  ? columnDefType === 'display'
2078
- ? '0 0.5rem'
2079
- : '0.5rem'
2080
- : density === 'comfortable'
2081
- ? columnDefType === 'display'
2082
- ? '0.5rem 0.75rem'
2083
- : '1rem'
2084
- : columnDefType === 'display'
2085
- ? '1rem 1.25rem'
2086
- : '1.5rem', pl: column.id === 'mrt-row-expand'
2087
- ? `${row.depth +
2088
- (density === 'compact'
2089
- ? 0.5
2090
- : density === 'comfortable'
2091
- ? 0.75
2092
- : 1.25)}rem`
2093
- : undefined, position: column.getIsPinned() ? 'sticky' : 'relative', right: column.getIsPinned() === 'right' ? `${getTotalRight()}px` : undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, transition: 'all 0.2s ease-in-out', whiteSpace: density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0, '&:hover': {
2094
- backgroundColor: enableHover &&
2095
- enableEditing &&
2096
- columnDef.enableEditing !== false &&
2097
- ['table', 'cell'].includes(editingMode !== null && editingMode !== void 0 ? editingMode : '')
2098
- ? theme.palette.mode === 'dark'
2099
- ? `${material.lighten(theme.palette.background.default, 0.2)} !important`
2100
- : `${material.darken(theme.palette.background.default, 0.1)} !important`
2101
- : undefined,
2102
- } }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
2103
- ? tableCellProps.sx(theme)
2104
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx)), draggingBorders), { maxWidth: `min(${column.getSize()}px, fit-content)`, minWidth: `max(${column.getSize()}px, ${(_a = columnDef.minSize) !== null && _a !== void 0 ? _a : 30}px)`, width: column.getSize() }));
2105
- } }),
2074
+ ? '0.5rem 0.75rem'
2075
+ : '1rem'
2076
+ : columnDefType === 'display'
2077
+ ? '1rem 1.25rem'
2078
+ : '1.5rem', pl: column.id === 'mrt-row-expand'
2079
+ ? `${row.depth +
2080
+ (density === 'compact'
2081
+ ? 0.5
2082
+ : density === 'comfortable'
2083
+ ? 0.75
2084
+ : 1.25)}rem`
2085
+ : undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0, '&:hover': {
2086
+ backgroundColor: enableHover &&
2087
+ enableEditing &&
2088
+ columnDef.enableEditing !== false &&
2089
+ ['table', 'cell'].includes(editingMode !== null && editingMode !== void 0 ? editingMode : '')
2090
+ ? theme.palette.mode === 'dark'
2091
+ ? `${material.lighten(theme.palette.background.default, 0.2)} !important`
2092
+ : `${material.darken(theme.palette.background.default, 0.1)} !important`
2093
+ : undefined,
2094
+ } }, getCommonCellStyles({ column, table, theme, tableCellProps })), draggingBorders)) }),
2106
2095
  React__default["default"].createElement(React__default["default"].Fragment, null, cell.getIsPlaceholder() ? null : isLoading || showSkeletons ? (React__default["default"].createElement(material.Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
2107
2096
  rowNumberMode === 'static' &&
2108
2097
  column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (React__default["default"].createElement(MRT_TableBodyRowGrabHandle, { cell: cell, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
@@ -2255,7 +2244,7 @@ const MRT_TableBody = ({ table }) => {
2255
2244
 
2256
2245
  const MRT_TableFooterCell = ({ footer, table }) => {
2257
2246
  var _a, _b, _c;
2258
- const { getState, options: { muiTableFooterCellProps, enableColumnResizing }, } = table;
2247
+ const { getState, options: { muiTableFooterCellProps }, } = table;
2259
2248
  const { density } = getState();
2260
2249
  const { column } = footer;
2261
2250
  const { columnDef } = column;
@@ -2267,13 +2256,11 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2267
2256
  ? columnDef.muiTableFooterCellProps({ column, table })
2268
2257
  : columnDef.muiTableFooterCellProps;
2269
2258
  const tableCellProps = Object.assign(Object.assign({}, mTableFooterCellProps), mcTableFooterCellProps);
2270
- return (React__default["default"].createElement(material.TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: theme.palette.background.default, backgroundImage: `linear-gradient(${material.alpha(theme.palette.common.white, 0.05)},${material.alpha(theme.palette.common.white, 0.05)})`, fontWeight: 'bold', maxWidth: `${column.getSize()}px`, minWidth: `${column.getSize()}px`, p: density === 'compact'
2259
+ return (React__default["default"].createElement(material.TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign({ fontWeight: 'bold', p: density === 'compact'
2271
2260
  ? '0.5rem'
2272
2261
  : density === 'comfortable'
2273
2262
  ? '1rem'
2274
- : '1.5rem', transition: `all ${enableColumnResizing ? '10ms' : '0.2s'} ease-in-out`, width: column.getSize(), verticalAlign: 'text-top' }, ((tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx) instanceof Function
2275
- ? tableCellProps.sx(theme)
2276
- : tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx))) }),
2263
+ : '1.5rem', verticalAlign: 'top' }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
2277
2264
  React__default["default"].createElement(React__default["default"].Fragment, null, footer.isPlaceholder
2278
2265
  ? null
2279
2266
  : (_c = (_b = (columnDef.Footer instanceof Function