material-react-table 0.40.8 → 0.40.11

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.
@@ -160,7 +160,7 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
160
160
  filterFn?: MRT_FilterFn<TData>;
161
161
  filterSelectOptions?: (string | {
162
162
  text: string;
163
- value: string;
163
+ value: any;
164
164
  })[];
165
165
  filterVariant?: 'text' | 'select' | 'multi-select' | 'range';
166
166
  /**
@@ -181,9 +181,11 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
181
181
  * @default gets set to the same value as `accessorKey` by default
182
182
  */
183
183
  id?: LiteralUnion<string & keyof TData>;
184
- muiTableBodyCellCopyButtonProps?: ButtonProps | (({ cell, table, }: {
185
- table: MRT_TableInstance<TData>;
184
+ muiTableBodyCellCopyButtonProps?: ButtonProps | (({ cell, column, row, table, }: {
186
185
  cell: MRT_Cell<TData>;
186
+ column: MRT_Column<TData>;
187
+ row: MRT_Row<TData>;
188
+ table: MRT_TableInstance<TData>;
187
189
  }) => ButtonProps);
188
190
  muiTableBodyCellEditTextFieldProps?: TextFieldProps | (({ cell, column, row, table, }: {
189
191
  cell: MRT_Cell<TData>;
@@ -248,16 +248,17 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
248
248
  Math.max(...Object.values(rowA.columnFiltersMeta).map((v) => v.rank));
249
249
 
250
250
  const MRT_ExpandAllButton = ({ table }) => {
251
+ var _a;
251
252
  const { getIsAllRowsExpanded, getIsSomeRowsExpanded, getCanSomeRowsExpand, getState, options: { icons: { KeyboardDoubleArrowDownIcon }, localization, muiExpandAllButtonProps, renderDetailPanel, }, toggleAllRowsExpanded, } = table;
252
253
  const { density } = getState();
253
254
  const iconButtonProps = muiExpandAllButtonProps instanceof Function
254
255
  ? muiExpandAllButtonProps({ table })
255
256
  : muiExpandAllButtonProps;
256
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.expandAll },
257
+ return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.expandAll },
257
258
  React.createElement("span", null,
258
259
  React.createElement(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: !getCanSomeRowsExpand() && !renderDetailPanel, onClick: () => toggleAllRowsExpanded(!getIsAllRowsExpanded()) }, iconButtonProps, { sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
259
260
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
260
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
261
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
261
262
  React.createElement(KeyboardDoubleArrowDownIcon, { style: {
262
263
  transform: `rotate(${getIsAllRowsExpanded()
263
264
  ? -180
@@ -269,6 +270,7 @@ const MRT_ExpandAllButton = ({ table }) => {
269
270
  };
270
271
 
271
272
  const MRT_ExpandButton = ({ row, table }) => {
273
+ var _a;
272
274
  const { getState, options: { icons: { ExpandMoreIcon }, localization, muiExpandButtonProps, renderDetailPanel, }, } = table;
273
275
  const { density } = getState();
274
276
  const iconButtonProps = muiExpandButtonProps instanceof Function
@@ -280,11 +282,11 @@ const MRT_ExpandButton = ({ row, table }) => {
280
282
  row.toggleExpanded();
281
283
  (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
282
284
  };
283
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.expand },
285
+ return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.expand },
284
286
  React.createElement("span", null,
285
287
  React.createElement(IconButton, Object.assign({ "aria-label": localization.expand, disabled: !row.getCanExpand() && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', width: density === 'compact' ? '1.75rem' : '2.25rem' }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
286
288
  ? iconButtonProps.sx(theme)
287
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
289
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
288
290
  React.createElement(ExpandMoreIcon, { style: {
289
291
  transform: `rotate(${!row.getCanExpand() && !renderDetailPanel
290
292
  ? -90
@@ -464,8 +466,9 @@ const MRT_ColumnPinningButtons = ({ column, table, }) => {
464
466
  };
465
467
 
466
468
  const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table, }) => {
469
+ var _a;
467
470
  const { options: { icons: { DragHandleIcon }, localization, }, } = table;
468
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: localization.move },
471
+ return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.move },
469
472
  React.createElement(IconButton, Object.assign({ disableRipple: true, draggable: "true", onDragStart: onDragStart, onDragEnd: onDragEnd, size: "small" }, iconButtonProps, { onClick: (e) => {
470
473
  var _a;
471
474
  e.stopPropagation();
@@ -477,7 +480,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
477
480
  cursor: 'grabbing',
478
481
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
479
482
  ? iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx(theme)
480
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
483
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
481
484
  React.createElement(DragHandleIcon, null))));
482
485
  };
483
486
 
@@ -973,6 +976,7 @@ const MRT_ToggleRowActionMenuButton = ({ cell, row, table, }) => {
973
976
  };
974
977
 
975
978
  const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
979
+ var _a;
976
980
  const { getState, options: { localization, muiSelectCheckboxProps, muiSelectAllCheckboxProps, selectAllMode, }, } = table;
977
981
  const { density } = getState();
978
982
  const checkboxProps = !row
@@ -982,7 +986,9 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
982
986
  : muiSelectCheckboxProps instanceof Function
983
987
  ? muiSelectCheckboxProps({ row, table })
984
988
  : muiSelectCheckboxProps;
985
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: selectAll ? localization.toggleSelectAll : localization.toggleSelectRow },
989
+ return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
990
+ ? localization.toggleSelectAll
991
+ : localization.toggleSelectRow) },
986
992
  React.createElement(Checkbox, Object.assign({ checked: selectAll ? table.getIsAllRowsSelected() : row === null || row === void 0 ? void 0 : row.getIsSelected(), indeterminate: selectAll ? table.getIsSomeRowsSelected() : row === null || row === void 0 ? void 0 : row.getIsSomeSelected(), inputProps: {
987
993
  'aria-label': selectAll
988
994
  ? localization.toggleSelectAll
@@ -997,7 +1003,7 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
997
1003
  (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
998
1004
  }, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.5rem', width: density === 'compact' ? '1.75rem' : '2.5rem', m: density !== 'compact' ? '-0.4rem' : undefined }, ((checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx) instanceof Function
999
1005
  ? checkboxProps.sx(theme)
1000
- : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) }))));
1006
+ : checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))), title: undefined }))));
1001
1007
  };
1002
1008
 
1003
1009
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -1115,17 +1121,19 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
1115
1121
  };
1116
1122
 
1117
1123
  const MRT_FullScreenToggleButton = (_a) => {
1124
+ var _b;
1118
1125
  var { table } = _a, rest = __rest(_a, ["table"]);
1119
1126
  const { getState, options: { icons: { FullscreenExitIcon, FullscreenIcon }, localization, }, setIsFullScreen, } = table;
1120
1127
  const { isFullScreen } = getState();
1121
1128
  const handleToggleFullScreen = () => {
1122
1129
  setIsFullScreen(!isFullScreen);
1123
1130
  };
1124
- return (React.createElement(Tooltip, { arrow: true, title: localization.toggleFullScreen },
1125
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest), isFullScreen ? React.createElement(FullscreenExitIcon, null) : React.createElement(FullscreenIcon, null))));
1131
+ return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen },
1132
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleFullScreen }, rest, { title: undefined }), isFullScreen ? React.createElement(FullscreenExitIcon, null) : React.createElement(FullscreenIcon, null))));
1126
1133
  };
1127
1134
 
1128
1135
  const MRT_ShowHideColumnsButton = (_a) => {
1136
+ var _b;
1129
1137
  var { table } = _a, rest = __rest(_a, ["table"]);
1130
1138
  const { options: { icons: { ViewColumnIcon }, localization, }, } = table;
1131
1139
  const [anchorEl, setAnchorEl] = useState(null);
@@ -1133,13 +1141,14 @@ const MRT_ShowHideColumnsButton = (_a) => {
1133
1141
  setAnchorEl(event.currentTarget);
1134
1142
  };
1135
1143
  return (React.createElement(React.Fragment, null,
1136
- React.createElement(Tooltip, { arrow: true, title: localization.showHideColumns },
1137
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest),
1144
+ React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns },
1145
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined }),
1138
1146
  React.createElement(ViewColumnIcon, null))),
1139
1147
  React.createElement(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table })));
1140
1148
  };
1141
1149
 
1142
1150
  const MRT_ToggleDensePaddingButton = (_a) => {
1151
+ var _b;
1143
1152
  var { table } = _a, rest = __rest(_a, ["table"]);
1144
1153
  const { getState, options: { icons: { DensityLargeIcon, DensityMediumIcon, DensitySmallIcon }, localization, }, setDensity, } = table;
1145
1154
  const { density } = getState();
@@ -1151,22 +1160,24 @@ const MRT_ToggleDensePaddingButton = (_a) => {
1151
1160
  : 'comfortable';
1152
1161
  setDensity(nextDensity);
1153
1162
  };
1154
- return (React.createElement(Tooltip, { arrow: true, title: localization.toggleDensity },
1155
- React.createElement(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest), density === 'compact' ? (React.createElement(DensitySmallIcon, null)) : density === 'comfortable' ? (React.createElement(DensityMediumIcon, null)) : (React.createElement(DensityLargeIcon, null)))));
1163
+ return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity },
1164
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined }), density === 'compact' ? (React.createElement(DensitySmallIcon, null)) : density === 'comfortable' ? (React.createElement(DensityMediumIcon, null)) : (React.createElement(DensityLargeIcon, null)))));
1156
1165
  };
1157
1166
 
1158
1167
  const MRT_ToggleFiltersButton = (_a) => {
1168
+ var _b;
1159
1169
  var { table } = _a, rest = __rest(_a, ["table"]);
1160
1170
  const { getState, options: { icons: { FilterListIcon, FilterListOffIcon }, localization, }, setShowFilters, } = table;
1161
1171
  const { showColumnFilters } = getState();
1162
1172
  const handleToggleShowFilters = () => {
1163
1173
  setShowFilters(!showColumnFilters);
1164
1174
  };
1165
- return (React.createElement(Tooltip, { arrow: true, title: localization.showHideFilters },
1166
- React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest), showColumnFilters ? React.createElement(FilterListOffIcon, null) : React.createElement(FilterListIcon, null))));
1175
+ return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters },
1176
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined }), showColumnFilters ? React.createElement(FilterListOffIcon, null) : React.createElement(FilterListIcon, null))));
1167
1177
  };
1168
1178
 
1169
1179
  const MRT_ToggleGlobalFilterButton = (_a) => {
1180
+ var _b;
1170
1181
  var { table } = _a, rest = __rest(_a, ["table"]);
1171
1182
  const { getState, options: { icons: { SearchIcon, SearchOffIcon }, localization, }, refs: { searchInputRef }, setShowGlobalFilter, } = table;
1172
1183
  const { showGlobalFilter } = getState();
@@ -1174,8 +1185,8 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
1174
1185
  setShowGlobalFilter(!showGlobalFilter);
1175
1186
  queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
1176
1187
  };
1177
- return (React.createElement(Tooltip, { arrow: true, title: localization.showHideSearch },
1178
- React.createElement(IconButton, Object.assign({ onClick: handleToggleSearch }, rest), showGlobalFilter ? React.createElement(SearchOffIcon, null) : React.createElement(SearchIcon, null))));
1188
+ return (React.createElement(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch },
1189
+ React.createElement(IconButton, Object.assign({ onClick: handleToggleSearch }, rest, { title: undefined }), showGlobalFilter ? React.createElement(SearchOffIcon, null) : React.createElement(SearchIcon, null))));
1179
1190
  };
1180
1191
 
1181
1192
  const MRT_ToolbarInternalButtons = ({ table }) => {
@@ -1307,6 +1318,7 @@ const MRT_BottomToolbar = ({ table }) => {
1307
1318
  };
1308
1319
 
1309
1320
  const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1321
+ var _a;
1310
1322
  const { options: { icons: { MoreVertIcon }, localization, muiTableHeadCellColumnActionsButtonProps, }, } = table;
1311
1323
  const { column } = header;
1312
1324
  const { columnDef } = column;
@@ -1327,12 +1339,12 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1327
1339
  : columnDef.muiTableHeadCellColumnActionsButtonProps;
1328
1340
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1329
1341
  return (React.createElement(React.Fragment, null,
1330
- React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: localization.columnActions },
1342
+ React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions },
1331
1343
  React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', mt: '-0.2rem', opacity: 0.5, transition: 'opacity 0.2s', width: '2rem', '&:hover': {
1332
1344
  opacity: 1,
1333
1345
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1334
1346
  ? iconButtonProps.sx(theme)
1335
- : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))) }),
1347
+ : iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx))), title: undefined }),
1336
1348
  React.createElement(MoreVertIcon, null))),
1337
1349
  React.createElement(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table })));
1338
1350
  };
@@ -1476,7 +1488,15 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1476
1488
  displayEmpty: true,
1477
1489
  multiple: isMultiSelectFilter,
1478
1490
  renderValue: isMultiSelectFilter
1479
- ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (React.createElement(Box, { sx: { opacity: 0.5 } }, filterPlaceholder)) : (React.createElement(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, selected === null || selected === void 0 ? void 0 : selected.map((value) => (React.createElement(Chip, { key: value, label: value })))))
1491
+ ? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (React.createElement(Box, { sx: { opacity: 0.5 } }, filterPlaceholder)) : (React.createElement(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' } }, selected === null || selected === void 0 ? void 0 : selected.map((value) => {
1492
+ var _a;
1493
+ const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
1494
+ ? option.value === value
1495
+ : option === value);
1496
+ return (React.createElement(Chip, { key: value, label: selectedValue instanceof Object
1497
+ ? selectedValue.text
1498
+ : selectedValue }));
1499
+ })))
1480
1500
  : undefined,
1481
1501
  } }, textFieldProps, { inputRef: (inputRef) => {
1482
1502
  filterInputRefs.current[`${column.id}-${rangeFilterIndex !== null && rangeFilterIndex !== void 0 ? rangeFilterIndex : 0}`] =
@@ -1867,6 +1887,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
1867
1887
  };
1868
1888
 
1869
1889
  const MRT_CopyButton = ({ cell, children, table, }) => {
1890
+ var _a;
1870
1891
  const { options: { localization, muiTableBodyCellCopyButtonProps }, } = table;
1871
1892
  const { column, row } = cell;
1872
1893
  const { columnDef } = column;
@@ -1883,14 +1904,16 @@ const MRT_CopyButton = ({ cell, children, table, }) => {
1883
1904
  const mcTableBodyCellCopyButtonProps = columnDef.muiTableBodyCellCopyButtonProps instanceof Function
1884
1905
  ? columnDef.muiTableBodyCellCopyButtonProps({
1885
1906
  cell,
1907
+ column,
1908
+ row,
1886
1909
  table,
1887
1910
  })
1888
1911
  : columnDef.muiTableBodyCellCopyButtonProps;
1889
1912
  const buttonProps = Object.assign(Object.assign({}, mTableBodyCellCopyButtonProps), mcTableBodyCellCopyButtonProps);
1890
- return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: copied ? localization.copiedToClipboard : localization.clickToCopy },
1913
+ return (React.createElement(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _a !== void 0 ? _a : (copied ? localization.copiedToClipboard : localization.clickToCopy) },
1891
1914
  React.createElement(Button, Object.assign({ onClick: (e) => handleCopy(e, cell.getValue()), size: "small", type: "button", variant: "text" }, buttonProps, { sx: (theme) => (Object.assign({ backgroundColor: 'transparent', border: 'none', color: 'inherit', cursor: 'copy', fontFamily: 'inherit', fontSize: 'inherit', letterSpacing: 'inherit', m: '-0.25rem', minWidth: 'unset', textAlign: 'inherit', textTransform: 'inherit' }, ((buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx) instanceof Function
1892
1915
  ? buttonProps.sx(theme)
1893
- : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))) }), children)));
1916
+ : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx))), title: undefined }), children)));
1894
1917
  };
1895
1918
 
1896
1919
  const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table, }) => {
@@ -2370,7 +2393,7 @@ const MRT_EditRowModal = ({ open, row, table, }) => {
2370
2393
  };
2371
2394
 
2372
2395
  const MRT_TableRoot = (props) => {
2373
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
2396
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
2374
2397
  const bottomToolbarRef = useRef(null);
2375
2398
  const editInputRefs = useRef({});
2376
2399
  const filterInputRefs = useRef({});
@@ -2442,7 +2465,15 @@ const MRT_TableRoot = (props) => {
2442
2465
  props.positionActionsColumn,
2443
2466
  props.renderDetailPanel,
2444
2467
  ]);
2445
- const columnDefs = useMemo(() => prepareColumns([...displayColumns, ...props.columns], columnFilterFns, props.filterFns, props.sortingFns), [columnFilterFns, displayColumns, props.columns]);
2468
+ const columnDefs = useMemo(() => {
2469
+ var _a, _b;
2470
+ return prepareColumns([...displayColumns, ...props.columns], (_b = (_a = props.state) === null || _a === void 0 ? void 0 : _a.columnFilterFns) !== null && _b !== void 0 ? _b : columnFilterFns, props.filterFns, props.sortingFns);
2471
+ }, [
2472
+ columnFilterFns,
2473
+ displayColumns,
2474
+ props.columns,
2475
+ (_r = props.state) === null || _r === void 0 ? void 0 : _r.columnFilterFns,
2476
+ ]);
2446
2477
  const data = useMemo(() => {
2447
2478
  var _a, _b, _c, _d, _e;
2448
2479
  return (((_a = props.state) === null || _a === void 0 ? void 0 : _a.isLoading) || ((_b = props.state) === null || _b === void 0 ? void 0 : _b.showSkeletons)) &&
@@ -2458,11 +2489,11 @@ const MRT_TableRoot = (props) => {
2458
2489
  });
2459
2490
  })))
2460
2491
  : props.data;
2461
- }, [props.data, (_r = props.state) === null || _r === void 0 ? void 0 : _r.isLoading, (_s = props.state) === null || _s === void 0 ? void 0 : _s.showSkeletons]);
2492
+ }, [props.data, (_s = props.state) === null || _s === void 0 ? void 0 : _s.isLoading, (_t = props.state) === null || _t === void 0 ? void 0 : _t.showSkeletons]);
2462
2493
  //@ts-ignore
2463
2494
  const table = Object.assign(Object.assign({}, useReactTable(Object.assign(Object.assign({ getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel(), getFacetedRowModel: getFacetedRowModel(), getFilteredRowModel: getFilteredRowModel(), getGroupedRowModel: getGroupedRowModel(), getPaginationRowModel: getPaginationRowModel(), getSortedRowModel: getSortedRowModel(), onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
2464
2495
  //@ts-ignore
2465
- columns: columnDefs, data, globalFilterFn: (_u = (_t = props.filterFns) === null || _t === void 0 ? void 0 : _t[globalFilterFn]) !== null && _u !== void 0 ? _u : (_v = props.filterFns) === null || _v === void 0 ? void 0 : _v.fuzzy, initialState, state: Object.assign({ columnFilterFns,
2496
+ columns: columnDefs, data, globalFilterFn: (_v = (_u = props.filterFns) === null || _u === void 0 ? void 0 : _u[globalFilterFn]) !== null && _v !== void 0 ? _v : (_w = props.filterFns) === null || _w === void 0 ? void 0 : _w.fuzzy, initialState, state: Object.assign({ columnFilterFns,
2466
2497
  columnOrder,
2467
2498
  density,
2468
2499
  draggingColumn,
@@ -2483,7 +2514,7 @@ const MRT_TableRoot = (props) => {
2483
2514
  searchInputRef,
2484
2515
  tableContainerRef,
2485
2516
  topToolbarRef,
2486
- }, setColumnFilterFns: (_w = props.onFilterFnsChange) !== null && _w !== void 0 ? _w : setColumnFilterFns, setDensity: (_x = props.onDensityChange) !== null && _x !== void 0 ? _x : setDensity, setDraggingColumn: (_y = props.onDraggingColumnChange) !== null && _y !== void 0 ? _y : setDraggingColumn, setDraggingRow: (_z = props.onDraggingRowChange) !== null && _z !== void 0 ? _z : setDraggingRow, setEditingCell: (_0 = props.onEditingCellChange) !== null && _0 !== void 0 ? _0 : setEditingCell, setEditingRow: (_1 = props.onEditingRowChange) !== null && _1 !== void 0 ? _1 : setEditingRow, setGlobalFilterFn: (_2 = props.onGlobalFilterFnChange) !== null && _2 !== void 0 ? _2 : setGlobalFilterFn, setHoveredColumn: (_3 = props.onHoveredColumnChange) !== null && _3 !== void 0 ? _3 : setHoveredColumn, setHoveredRow: (_4 = props.onHoveredRowChange) !== null && _4 !== void 0 ? _4 : setHoveredRow, setIsFullScreen: (_5 = props.onIsFullScreenChange) !== null && _5 !== void 0 ? _5 : setIsFullScreen, setShowAlertBanner: (_6 = props.onShowAlertBannerChange) !== null && _6 !== void 0 ? _6 : setShowAlertBanner, setShowFilters: (_7 = props.onShowFiltersChange) !== null && _7 !== void 0 ? _7 : setShowFilters, setShowGlobalFilter: (_8 = props.onShowGlobalFilterChange) !== null && _8 !== void 0 ? _8 : setShowGlobalFilter });
2517
+ }, setColumnFilterFns: (_x = props.onFilterFnsChange) !== null && _x !== void 0 ? _x : setColumnFilterFns, setDensity: (_y = props.onDensityChange) !== null && _y !== void 0 ? _y : setDensity, setDraggingColumn: (_z = props.onDraggingColumnChange) !== null && _z !== void 0 ? _z : setDraggingColumn, setDraggingRow: (_0 = props.onDraggingRowChange) !== null && _0 !== void 0 ? _0 : setDraggingRow, setEditingCell: (_1 = props.onEditingCellChange) !== null && _1 !== void 0 ? _1 : setEditingCell, setEditingRow: (_2 = props.onEditingRowChange) !== null && _2 !== void 0 ? _2 : setEditingRow, setGlobalFilterFn: (_3 = props.onGlobalFilterFnChange) !== null && _3 !== void 0 ? _3 : setGlobalFilterFn, setHoveredColumn: (_4 = props.onHoveredColumnChange) !== null && _4 !== void 0 ? _4 : setHoveredColumn, setHoveredRow: (_5 = props.onHoveredRowChange) !== null && _5 !== void 0 ? _5 : setHoveredRow, setIsFullScreen: (_6 = props.onIsFullScreenChange) !== null && _6 !== void 0 ? _6 : setIsFullScreen, setShowAlertBanner: (_7 = props.onShowAlertBannerChange) !== null && _7 !== void 0 ? _7 : setShowAlertBanner, setShowFilters: (_8 = props.onShowFiltersChange) !== null && _8 !== void 0 ? _8 : setShowFilters, setShowGlobalFilter: (_9 = props.onShowGlobalFilterChange) !== null && _9 !== void 0 ? _9 : setShowGlobalFilter });
2487
2518
  if (props.tableInstanceRef) {
2488
2519
  props.tableInstanceRef.current = table;
2489
2520
  }