@@ -33,7 +33,6 @@ export type PaginationOptions<TGenerics extends TableGenerics> = {
33
33
34
34
export type PaginationDefaultOptions = {
35
35
onPaginationChange : OnChangeFn < PaginationState >
36
- autoResetPageIndex : boolean
37
36
}
38
37
39
38
export type PaginationInstance < TGenerics extends TableGenerics > = {
@@ -82,7 +81,6 @@ export const Pagination: TableFeature = {
82
81
) : PaginationDefaultOptions => {
83
82
return {
84
83
onPaginationChange : makeStateUpdater ( 'pagination' , instance ) ,
85
- autoResetPageIndex : true ,
86
84
}
87
85
} ,
88
86
@@ -101,13 +99,10 @@ export const Pagination: TableFeature = {
101
99
return
102
100
}
103
101
104
- if ( instance . options . autoResetAll === false ) {
105
- return
106
- }
107
-
108
102
if (
109
- instance . options . autoResetAll === true ||
110
- instance . options . autoResetPageIndex
103
+ instance . options . autoResetAll ??
104
+ instance . options . autoResetPageIndex ??
105
+ ! instance . options . manualPagination
111
106
) {
112
107
if ( queued ) return
113
108
queued = true
@@ -138,7 +133,7 @@ export const Pagination: TableFeature = {
138
133
let pageIndex = functionalUpdate ( updater , old . pageIndex )
139
134
140
135
const maxPageIndex =
141
- old . pageCount && old . pageCount > 0
136
+ typeof old . pageCount !== 'undefined'
142
137
? old . pageCount - 1
143
138
: Number . MAX_SAFE_INTEGER
144
139
0 commit comments