Remove fixed header during reload using table.destroy() and empty()
Remove fixed header during reload using table.destroy() and empty()
On this table: https://bit.ly/3XpuhsU
we have the following problem:
When you switch in view to table view and then remove the filter you will see shortly this fixed header: https://imgur.com/a/lNwgQxi
We tried to reload the full table, described here: https://datatables.net/reference/api/destroy()
but had no luck. The initial problem was solved, but then the columns were missing in the reloaded table: https://i.imgur.com/pGHbs2I.png
Any idea what we are missing to make it properly work?
Thank you
This question has an accepted answers - jump to answer
Answers
One option might be to hide the
tablewhen usingdestroy(). Then ininitCompleteunhide the table and usecolumns.adjust()to recalculate the columns widths for the visible table.Kevin
Thank you for the quick answer.
Did not get notification by e-mail so just saw by manually checking this link.
Will try soon and let you know whether this could solve it.
Thanks
We just tested it and it works.
Thanks a lot for the quick help!