fix: Hundreds of chunks list can't choose page #1238 (#1532)

### What problem does this PR solve?

fix: Hundreds of chunks list can't choose page #1238

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-07-16 15:06:38 +08:00 committed by GitHub
parent 607de74ace
commit 975798c643
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,7 +53,11 @@ const model: DvaModel<ChunkModelState> = {
return { ...state, available: payload };
},
setSearchString(state, { payload }) {
return { ...state, searchString: payload };
return {
...state,
pagination: { ...state.pagination, current: 1 },
searchString: payload,
};
},
setPagination(state, { payload }) {
return { ...state, pagination: { ...state.pagination, ...payload } };