material-react-table 0.40.7 → 0.40.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -322,7 +322,7 @@ declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit<Column
322
322
  *
323
323
  * @example accessorFn: (row) => row.username
324
324
  */
325
- accessorFn?: (row: TData) => any;
325
+ accessorFn?: (originalRow: TData) => any;
326
326
  /**
327
327
  * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
328
328
  * Specify which key in the row this column should use to access the correct data.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.7",
2
+ "version": "0.40.8",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -236,7 +236,7 @@ export type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit<
236
236
  *
237
237
  * @example accessorFn: (row) => row.username
238
238
  */
239
- accessorFn?: (row: TData) => any;
239
+ accessorFn?: (originalRow: TData) => any;
240
240
  /**
241
241
  * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
242
242
  * Specify which key in the row this column should use to access the correct data.
@@ -51,7 +51,8 @@ export const MRT_TableBody: FC<Props> = ({ table, tableContainerRef }) => {
51
51
  rankGlobalFuzzy(a, b),
52
52
  );
53
53
  if (enablePagination) {
54
- return rankedRows.slice(pagination.pageIndex, pagination.pageSize);
54
+ const start = pagination.pageIndex * pagination.pageSize;
55
+ return rankedRows.slice(start, start + pagination.pageSize);
55
56
  }
56
57
  return rankedRows;
57
58
  }
@@ -65,6 +66,8 @@ export const MRT_TableBody: FC<Props> = ({ table, tableContainerRef }) => {
65
66
  ? getPrePaginationRowModel().rows
66
67
  : getRowModel().rows,
67
68
  globalFilter,
69
+ pagination.pageIndex,
70
+ pagination.pageSize,
68
71
  ]);
69
72
 
70
73
  const virtualizer = enableRowVirtualization