New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add property to allow custom breakLabel behaviour #263
Comments
Bumped into the same issue today. I just used the |
I'm not sure to understand what you're trying to do but you could probably use the |
The As kstratis has stated, with the usage of e.stopPropagation it is possible to prevent the onPageChange prop to be called when clicking the node which you can set as breakLabel. Although you can only use text node elements (at least to the browser warnings, because the breakLabel is nested in an a element). Because there is this workaround I could understand to not implement that "feature". |
Ok, I see what you mean. |
…com/Mairu/react-paginate into Mairu-#263-add-property-onBreakLabelClick
Hi, You can now use the callback For eg when you click a break element: In your case you can use the <ReactComponent
onClick={(clickEvent) => {
if (clickEvent.isBreak) return false;
}
/> You can also control the page to jump to by returning a number. Returning nothing or You can test it with:
@AdeleD could we release v8.0.3 and v8.1.0 to NPM? |
In version 5 of this package I used a link with custom change page handling logic provided as breakLabel.
Starting with version 6 this is not possible anymore.
So it would be nice if it would be possible to provide custom breakLabel click handling.
The text was updated successfully, but these errors were encountered: