codyhouse / cd-interactive-table-changelog

Report issues and get notified about changes affecting the 'Interactive Table' component.
https://codyhouse.co/ds/components/app/interactive-table
0 stars 0 forks source link

Interactive table sort and pagination via ajax #1

Open thewebartisan7 opened 4 years ago

thewebartisan7 commented 4 years ago

Hi, About your interactive table, since ordering/sorting of columns are via JS, it’s possible also sort via Ajax from server whole records or only this that are display? Also for next / previous pages, is possible via Ajax? Thanks

claudia-romano commented 4 years ago

Hi there, the Interactive table component sorts the available items in the table.

If you want to load new items when sorting your table, you can deactivate the default sorting functionality (removing the .js-int-table__cell--sort class from your cells) and make your Ajax call to load your new items.

Cheers!

thewebartisan7 commented 4 years ago

Thanks for your reply. I understand what you mean, but then the "interactive" table is not anymore so interactive. Would be nice to have loading of data via AJAX requests for paginations and sorting. Checkout this https://github.com/fiduswriter/Simple-DataTables or this https://gridjs.io. Maybe you can find some easy way, but I understand that there are many things to take into account, considering the sizes of this library. If you can make something basic that convert a JSON coming from server to table would be nice.