Skip to content

Commit 6159162

Browse files
committed
fix: set current page to 1 after select
1 parent df062c8 commit 6159162

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/context/issueContext.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export const IssueContextProvider = ({ children }) => {
215215

216216
setApiResult(issues);
217217
setPageCount(totalPages);
218+
setCurrentPage(1);
218219
} catch (error) {
219220
handleFetchError(error);
220221
}
@@ -305,6 +306,7 @@ export const IssueContextProvider = ({ children }) => {
305306
setSelectedLabel("all");
306307
setSearchValue("");
307308
setStateOpenOrClosed("open");
309+
setCurrentPage(1);
308310
getInitialData();
309311
},
310312
}}

0 commit comments

Comments
 (0)