nextui icon indicating copy to clipboard operation
nextui copied to clipboard

fix(react-pagination): add active page to memoized callback deps

Open tianenpang opened this issue 3 years ago • 1 comments

Closes https://github.com/nextui-org/nextui/issues/619

📝 Description

Reading state in pagination's onChange will always return the initial value.

⛳️ Current behavior (updates)

Add activePage to the memoized callback deps.

🚀 New behavior

Update or changes if total, activePage (deps) has been changed.

Read more: usecallback.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

Note The branch based on next.

tianenpang avatar Jul 19 '22 18:07 tianenpang

onChange donot work when it receive a new value, and param page cannot bind a react state

piczi avatar Aug 09 '22 03:08 piczi