material-react-table 0.40.7 → 0.40.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.
@@ -130,7 +130,7 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
130
130
  *
131
131
  * @example accessorFn: (row) => row.username
132
132
  */
133
- accessorFn?: (row: TData) => any;
133
+ accessorFn?: (originalRow: TData) => any;
134
134
  /**
135
135
  * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
136
136
  * Specify which key in the row this column should use to access the correct data.
@@ -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, }) => {
@@ -2154,7 +2177,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
2154
2177
  !Object.values(sorting).some(Boolean)) {
2155
2178
  const rankedRows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b));
2156
2179
  if (enablePagination) {
2157
- return rankedRows.slice(pagination.pageIndex, pagination.pageSize);
2180
+ const start = pagination.pageIndex * pagination.pageSize;
2181
+ return rankedRows.slice(start, start + pagination.pageSize);
2158
2182
  }
2159
2183
  return rankedRows;
2160
2184
  }
@@ -2167,6 +2191,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
2167
2191
  ? getPrePaginationRowModel().rows
2168
2192
  : getRowModel().rows,
2169
2193
  globalFilter,
2194
+ pagination.pageIndex,
2195
+ pagination.pageSize,
2170
2196
  ]);
2171
2197
  const virtualizer = enableRowVirtualization
2172
2198
  ? useVirtual(Object.assign({ size: rows.length, parentRef: tableContainerRef, overscan: 15 }, vProps))