datatable pagination from server side
I have a large datatable. I have read through documentation and tutorials on how to fetch data from ajax request. The thing is i don't want to fetch the data unless the users clicks on the page. So i want to invoke a method when user clicks on page. Can we customise onclick method on pages? Also without using AJAX, i don't mind reloading page.
p.s. I am using Ruby on Rails 6.1.14. And my data source is using cursor based pagination.