From a0995074a828725812ef9c05da21609c8694959a Mon Sep 17 00:00:00 2001 From: xiamiao Date: Mon, 8 Jul 2024 14:35:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(pagination):=20=E4=BF=AE=E5=A4=8DonJump?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=B2=A1=E6=9C=89=E8=A7=A6=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98(#2929)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/pagination/src/DefaultPagination.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ui/pagination/src/DefaultPagination.tsx b/packages/ui/pagination/src/DefaultPagination.tsx index 2bf29d085..d97e571e9 100644 --- a/packages/ui/pagination/src/DefaultPagination.tsx +++ b/packages/ui/pagination/src/DefaultPagination.tsx @@ -29,6 +29,7 @@ export const DefaultPagination = forwardRef { + proxyTrySetCurrent(page) + onJump && onJump(page) + }} maxJump={calculatePageCount(total, pageSize)} /> ) : null} From f88d578e0f577555b5894bed0c9b65d2a60824aa Mon Sep 17 00:00:00 2001 From: xiamiao Date: Mon, 8 Jul 2024 14:39:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(pagination):=20=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/quick-plums-cough.md | 5 +++++ .changeset/short-timers-trade.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/quick-plums-cough.md create mode 100644 .changeset/short-timers-trade.md diff --git a/.changeset/quick-plums-cough.md b/.changeset/quick-plums-cough.md new file mode 100644 index 000000000..a81c21192 --- /dev/null +++ b/.changeset/quick-plums-cough.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +feat(pagination): 修复 onJump 事件不触发的问题 diff --git a/.changeset/short-timers-trade.md b/.changeset/short-timers-trade.md new file mode 100644 index 000000000..e7980fef8 --- /dev/null +++ b/.changeset/short-timers-trade.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/pagination": patch +--- + +fix: 修复 onJump 事件不触发的问题 From 504b528b7f58708368fc8e796211a716130e5dd2 Mon Sep 17 00:00:00 2001 From: xiamiao Date: Wed, 24 Jul 2024 10:37:44 +0800 Subject: [PATCH 3/3] feat(pagination): refactor onJump --- .changeset/quick-plums-cough.md | 2 +- packages/ui/pagination/src/DefaultPagination.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/quick-plums-cough.md b/.changeset/quick-plums-cough.md index a81c21192..5040e2f01 100644 --- a/.changeset/quick-plums-cough.md +++ b/.changeset/quick-plums-cough.md @@ -2,4 +2,4 @@ "@hi-ui/hiui": patch --- -feat(pagination): 修复 onJump 事件不触发的问题 +fix(pagination): 修复 onJump 事件不触发的问题 diff --git a/packages/ui/pagination/src/DefaultPagination.tsx b/packages/ui/pagination/src/DefaultPagination.tsx index d97e571e9..cf70d2859 100644 --- a/packages/ui/pagination/src/DefaultPagination.tsx +++ b/packages/ui/pagination/src/DefaultPagination.tsx @@ -194,7 +194,7 @@ export const DefaultPagination = forwardRef { proxyTrySetCurrent(page) - onJump && onJump(page) + onJump?.(page) }} maxJump={calculatePageCount(total, pageSize)} />