Extra column select headers appending on data change
Extra column select headers appending on data change
Link to test case: https://jsfiddle.net/ecredlus/rckjnxo0/2/
Debugger code (debug.datatables.net): olefov
Error messages shown: None
Description of problem: When I change the data source (normally through AJAX) and have the table redraw, it keeps appending a new select box in the header. This was different than my original problem (the contents of the dropdown wouldn't refresh and the link between the contents and the data came out of synch, i.e. the filter tried to filter contents that didn't exist). I know the issue is line 156, but I can't figure out how to implement an empty or some other method to reset the header contents on data change.
This question has an accepted answers - jump to answer
Answers
Your test case has a console error: DTscript.js is not found (404).
You need to use
.empty()
like this example.Kevin