Gabrielr47 / easyTable

easyTable is a simple plugin for jQuery.
20 stars 7 forks source link

Pagination? #3

Closed bunkabox closed 7 years ago

bunkabox commented 7 years ago

Hello! I'm a beginner trying to use your amazing table, but I can't tell if there is functionality for pagination. Is there a way to do that in the current package?

For example, if I have 50 rows and want to limit the table rows to 13 per page and continue the data in a new page/table.

Thanks for the help!

Gabrielr47 commented 7 years ago

Hi, now we don't have this resource, but is easy to implement, first you need to put how much lines you want to show in the plugin, then you need to hide the other items, and show the button to "next". when you click in "next" it's just to show the hide ones and hide the showed.

Gabrielr47 commented 7 years ago

If you want to put pagination for not show all the items at the same time you can simple create a scroll like this: https://jsfiddle.net/cbsh4wf6/43/ you just need to pass these parameters:

var table = $("#table").easyTable({ scroll: { active: true, height: '400px' } });