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/cjs/MaterialReactTable.d.ts +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/MaterialReactTable.d.ts +1 -1
- package/dist/esm/material-react-table.esm.js +4 -1
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/MaterialReactTable.tsx +1 -1
- package/src/body/MRT_TableBody.tsx +4 -1
|
@@ -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?: (
|
|
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.
|
package/dist/cjs/index.js
CHANGED
|
@@ -2162,7 +2162,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
|
|
|
2162
2162
|
!Object.values(sorting).some(Boolean)) {
|
|
2163
2163
|
const rankedRows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b));
|
|
2164
2164
|
if (enablePagination) {
|
|
2165
|
-
|
|
2165
|
+
const start = pagination.pageIndex * pagination.pageSize;
|
|
2166
|
+
return rankedRows.slice(start, start + pagination.pageSize);
|
|
2166
2167
|
}
|
|
2167
2168
|
return rankedRows;
|
|
2168
2169
|
}
|
|
@@ -2175,6 +2176,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
|
|
|
2175
2176
|
? getPrePaginationRowModel().rows
|
|
2176
2177
|
: getRowModel().rows,
|
|
2177
2178
|
globalFilter,
|
|
2179
|
+
pagination.pageIndex,
|
|
2180
|
+
pagination.pageSize,
|
|
2178
2181
|
]);
|
|
2179
2182
|
const virtualizer = enableRowVirtualization
|
|
2180
2183
|
? reactVirtual.useVirtual(Object.assign({ size: rows.length, parentRef: tableContainerRef, overscan: 15 }, vProps))
|