-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Description
- I have looked through the documentation to try to see if this feature already exists.
- I have looked at the demos to see if one of them does what I want, but none of them did.
Is your feature request related to a problem? Please describe.
I dynamically populate my table via AJAX requests. A typical workflow is:
- A user searches a form
- This sends an AJAX request to fetch the filtered data
- The table should reflect what is returned by the server without having to destroy and reinitialize it
- Right now there's no one-liner to clear the grid before rehydrating
Describe the solution you'd like
Create a new method on the rows API that will remove every row on the grid, e.g.:
clear() {
this.dt.data.data.length = 0;
this.dt.update(true)
}
Describe alternatives you've considered
- Set the grid's data.data.length to 0
- Call the update method on the grid
Additional context
Example with workaround and use case: https://codepen.io/dday9/pen/OPyZzJK
esabol
Metadata
Metadata
Assignees
Labels
No labels