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

Support AJAX/Pagination+Search+Sort #386

Open
tacman opened this issue Jul 2, 2024 · 5 comments
Open

Support AJAX/Pagination+Search+Sort #386

tacman opened this issue Jul 2, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@tacman
Copy link

tacman commented Jul 2, 2024

I understand how to use insert() in order to add new rows, which works great when I simply want to load a bunch of data remotely.

But if the data is big it can become slow, so obviously I can just load part of that data. But then the datatable is only showing the partial data, and the pagination is related to the partial data.

If the library had a way to know the maximum number of items, the pagination could be based on that number, rather than the number of actual items. Of course, if someone clicked on a page (or sort, filter, etc.), it would need to make a callback to properly fetch the data.

I realize this isn't trivial, but would be a cool feature.

@johanneswilm johanneswilm added the enhancement New feature or request label Aug 21, 2024
@johanneswilm
Copy link
Member

@tacman I agree, that would be a nice addition. However, with a lot of the data not being available, the table cannot really do a lot of calculations, for example how wide a specific column should be given some settings, etc. .

@tacman
Copy link
Author

tacman commented Aug 21, 2024

Makes sense. it could default to treating the first X number of rows (from the ajax source) as if the data were in the HTML. Or allow the developers to set those attributes. Just brainstorming.

@walirt
Copy link

walirt commented Sep 16, 2024

any news?

@johanneswilm
Copy link
Member

@walirt Will you implement it? I have no use for such a feature personally.

@walirt
Copy link

walirt commented Sep 16, 2024

@walirt Will you implement it? I have no use for such a feature personally.

This is a common function of the data table, we generally do not return all the data from the api, but paging to return data

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

No branches or pull requests

3 participants