Fix: Share-log bugs (#9172)

### What problem does this PR solve?

Fix Share-log bugs #3221

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-01 21:55:49 +08:00
committed by GitHub
parent a16cd4f110
commit 47ba683728
4 changed files with 93 additions and 48 deletions

View File

@ -144,12 +144,14 @@ const AgentLogPage: React.FC = () => {
const handlePageChange = (current?: number, pageSize?: number) => {
console.log('current', current, 'pageSize', pageSize);
setPagination((pre) => {
return {
...pre,
current: current ?? pre.pageSize ? 1 : pre.current,
pageSize: pageSize ?? pre.pageSize,
};
let page = current || 1;
if (pagination.pageSize !== pageSize) {
page = 1;
}
setPagination({
...pagination,
current: page,
pageSize: pageSize || 10,
});
};