Holt59 / datatable

Javascript Plugin for data tables creation
http://holt59.github.io/datatable/
MIT License
107 stars 42 forks source link

Table reload method #47

Open brvhprince opened 2 years ago

brvhprince commented 2 years ago

This is more of a feature request than an issue. A method you can call e.g datatable.reload() to re-fetch the data from the provided URL on the AjaxOptions . The refresh property is available but it might not be useful and relevant in some use cases.

Example Use Case

A user table with options to toggle status on/off via an ajax call. After execution, I would like to fetch and update the existing data without having to reload the page.

Holt59 commented 2 years ago

I am not working actively on this project right now so it's unlikely this feature will ever be implemented but you can probably mimic it by simply deleting the old datatable and recreating with the exact same parameters.

brvhprince commented 2 years ago

Thanks for the feedback. I've added a custom method and it works fine. 👍