You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -213,7 +214,6 @@ function ListVertexScheduler({
213
214
constsetPaginationVariables=()=>{
214
215
letupdatedPageTokenList=[...pageTokenList];
215
216
letresetFlag=resetToCurrentPage;
216
-
217
217
if(fetchPreviousPage){
218
218
// True only in case of clicking for previous page
219
219
if(updatedPageTokenList.length>0){
@@ -243,8 +243,11 @@ function ListVertexScheduler({
243
243
}
244
244
}
245
245
setCanNextPage(hasNextPage);
246
-
consthasPreviousPage=updatedPageTokenList.length>1;// true only if not in first page
246
+
consthasPreviousPage=hasNextPage
247
+
? updatedPageTokenList.length>1
248
+
: updatedPageTokenList.length>0;// hasPreviousPage is true if there are more than 1 tokens in the list, which means there is a previous page available.
247
249
setCanPreviousPage(hasPreviousPage);// false only on first page
250
+
248
251
setPageTokenList([...updatedPageTokenList]);// set the updated token list after pagination
0 commit comments