Rerendering issue since v2
Rerendering issue since v2
![paulf](https://secure.gravatar.com/avatar/5767242852c0f4a5998fd54d9f4e8a51/?default=https%3A%2F%2Fvanillicon.com%2F5767242852c0f4a5998fd54d9f4e8a51_200.png&rating=g&size=120)
Hi, since updating to v2 we're unable to re-render a DataTable using the following code:
this.dtElement.dtInstance.then((dtInstance: Api): void => {
dtInstance.destroy();
this.dtTrigger.next(this.dtOptions);
});
Should this still be supported or is there another approach?
Replies
What is
this.dtTrigger.next
?Can you create a test case showing the issue please?
Allan
Thanks, is there a template for creating a test case?
https://live.datatables.net will get you a basic starting point.
If you are using Vue (which you might be at a guess?) you could use this example as a starting point.
Allan
Using Angular, thanks I'll get a test case made.
Are you using Angular DataTables like in this thread as well? If so, you'll need to ask the Angular DataTables dev. It isn't something I've worked with myself.
Allan
I am, after fixing initial issues with pagination he directed me here.
https://github.com/l-lin/angular-datatables/issues/1785
It isn't clear to me that it is a DataTables error, since I can readily destroy and recreate a table: https://live.datatables.net/povatuge/1/edit . I'd need a test case showing the issue to be able to understand what is happening.
Allan
I would look for errors in the browser's console.
Do the Datatables options change? Guessing
this.dtOptions
are the options.If the columns change you might need to empty the
table
as shown in one of the examples in the docs.If this doesn't help then the test case Allan asked for is needed for us to help debug.
Kevin
Thanks