Skip to content

Commit

Permalink
fix(pagination): 修复onJump事件没有触发的问题(#2929)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiamiao committed Jul 8, 2024
1 parent 8f888cb commit a099507
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/pagination/src/DefaultPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const DefaultPagination = forwardRef<HTMLDivElement | null, PaginationPro
pageSize: pageSizeProp,
max = 2,
total,
onJump,
onPageSizeChange,
showTotal,
showJumper,
Expand Down Expand Up @@ -191,7 +192,10 @@ export const DefaultPagination = forwardRef<HTMLDivElement | null, PaginationPro
<PageJumper
prefixCls={prefixCls}
pageText={[gotoText, pageText]}
onJump={proxyTrySetCurrent}
onJump={(page) => {
proxyTrySetCurrent(page)
onJump && onJump(page)
}}
maxJump={calculatePageCount(total, pageSize)}
/>
) : null}
Expand Down

0 comments on commit a099507

Please sign in to comment.