File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ export default function usePagination(
79
79
}
80
80
81
81
const refreshPagination = ( current = 1 , pageSize ?: number ) => {
82
+ if ( pagination . value === false ) return ;
82
83
setInnerPagination ( {
83
84
current,
84
85
pageSize : pageSize || mergedPagination . value . pageSize ,
@@ -93,15 +94,12 @@ export default function usePagination(
93
94
onChange ( current , pageSize || mergedPagination . value . pageSize ) ;
94
95
} ;
95
96
96
- if ( pagination . value === false ) {
97
- return [ computed ( ( ) => ( { } ) ) , ( ) => { } ] ;
98
- }
99
-
100
97
return [
101
- computed ( ( ) => ( {
102
- ...mergedPagination . value ,
103
- onChange : onInternalChange ,
104
- } ) ) ,
98
+ computed ( ( ) => {
99
+ return pagination . value === false
100
+ ? { }
101
+ : { ...mergedPagination . value , onChange : onInternalChange } ;
102
+ } ) ,
105
103
refreshPagination ,
106
104
] ;
107
105
}
You can’t perform that action at this time.
0 commit comments