Closed alwinaugustin closed 3 years ago
It is showing No data available in table sometimes, but when the page is refreshed, it will be gone.
This could be dtTrigger
misbehaving which is fixed when the page is refreshed.
Sometimes, it is showing DataTables warning: table id=releaseDatatable - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3"
This is triggered when table which is already a DataTable ready being re-initialized as a DataTable. The URL mentioned on the alert talks about this more.
One solution is to use DT destroy()
[API](https://datatables.net/reference/api/destroy()) to remove its enhancements so you can re-initialize your HTML table with new dtOptions
. In other words, call destroy()
on ngOnDestroy
of TableComponent
.
Also, your TableComponent
isn't implementing OnDestroy
which means it won't call ngOnDestroy
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to inactivity. Please feel free to re-open the issue to add new inputs.
I am using the Datatable as a component so that I can use it in all the templates I have. I have the following files :
table.component.ts
and the template file table.component.html is like the following:
and I am using this component as shown below:
Now I am facing multiple issues here :
It is showing No data available in table sometimes, but when the page is refreshed, it will be gone.
Sometimes, it is showing DataTables warning: table id=releaseDatatable - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3"
I'm submitting a...
[ ] Bug report [ ] Feature request [ ] Documentation issue or request [ x ] Question
Environment