diff --git a/.changeset/fix-autoResetPageIndex.md b/.changeset/fix-autoResetPageIndex.md new file mode 100644 index 0000000000..61964b74d6 --- /dev/null +++ b/.changeset/fix-autoResetPageIndex.md @@ -0,0 +1,5 @@ +--- +"@tanstack/table-core": patch +--- + +fix(pagination): autoResetPageIndex now resets to 0 instead of initialState pageIndex diff --git a/packages/table-core/src/features/RowPagination.ts b/packages/table-core/src/features/RowPagination.ts index 454c25aa8d..d444e030e0 100644 --- a/packages/table-core/src/features/RowPagination.ts +++ b/packages/table-core/src/features/RowPagination.ts @@ -231,7 +231,7 @@ export const RowPagination: TableFeature = { if (queued) return queued = true table._queue(() => { - table.resetPageIndex() + table.resetPageIndex(true) queued = false }) }