Skip to content
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

Override default pagination click handlers #84

Closed
paschaldev opened this issue Apr 1, 2019 · 2 comments
Closed

Override default pagination click handlers #84

paschaldev opened this issue Apr 1, 2019 · 2 comments

Comments

@paschaldev
Copy link

I'll like to use your pagination style but I need to override the whole click handlers so I can paginate over an API.

@jbetancur
Copy link
Owner

jbetancur commented Apr 2, 2019

Could you provide more details and specific handlers you want to "override"?

Not sure if this helps, but, you have the onChangePage and onChangeRowsPerPage which you can use on DataTable if you need access to the callback from the pagination handlers.

Also, if you need more control you could provide a custom pagination component using paginationComponent prop and implement whatever methods you want as long as you satisfy the prop requirements

The existing pagination component can be used for reference: https://github.com/jbetancur/react-data-table-component/blob/master/src/DataTable/Pagination.js

@paschaldev
Copy link
Author

Thanks @jbetancur I just copied the existing Pagination components and edited it to my taste. Works as I want for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants