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.
@@ -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.
@@ -2154,7 +2154,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
2154
2154
  !Object.values(sorting).some(Boolean)) {
2155
2155
  const rankedRows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b));
2156
2156
  if (enablePagination) {
2157
- return rankedRows.slice(pagination.pageIndex, pagination.pageSize);
2157
+ const start = pagination.pageIndex * pagination.pageSize;
2158
+ return rankedRows.slice(start, start + pagination.pageSize);
2158
2159
  }
2159
2160
  return rankedRows;
2160
2161
  }
@@ -2167,6 +2168,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
2167
2168
  ? getPrePaginationRowModel().rows
2168
2169
  : getRowModel().rows,
2169
2170
  globalFilter,
2171
+ pagination.pageIndex,
2172
+ pagination.pageSize,
2170
2173
  ]);
2171
2174
  const virtualizer = enableRowVirtualization
2172
2175
  ? useVirtual(Object.assign({ size: rows.length, parentRef: tableContainerRef, overscan: 15 }, vProps))