react-paginate icon indicating copy to clipboard operation
react-paginate copied to clipboard

can I disable the click event for break element

Open rinorzek opened this issue 2 years ago • 2 comments

I would like to remove the click event on the break element and only keep it for each page number, is there any way around this? Maybe the event object in the onPageChange function to have a property for telling if it's from page change or break?

rinorzek avatar Jun 14 '22 16:06 rinorzek

I would like the same

NeurAlch avatar Jun 18 '22 18:06 NeurAlch

@rinorzek @PabloRosales you can handle this at your side, pass onClick prop and just check isBreak property in onClick event, and in case true just return false from click handler function

You can see how it works here - https://github.com/AdeleD/react-paginate/blob/98db5f7a456919caa0e050164800766f7ca7f2c4/react_components/PaginationBoxView.js#L250

Zavrazhneva avatar Feb 08 '23 16:02 Zavrazhneva