react-paginate v8.1.0 Release Notes

    • 👀 A new prop onClick has been added. It is a callback for any click on the component. It exposes information on the part clicked (for eg. isNext for when next control is clicked or isBreak for a break clicked), the next expected page nextSelectedPage & others. Can return false to prevent any page change or a number to override the page to jump to. Just return nothing (or undefined) to let default behavior take place. (see: https://github.com/AdeleD/react-paginate/issues/263)
    • Prevent breaks to be displayed when both pageRangeDisplayed and marginPagesDisplayed are 0