Extra column select headers appending on data change

Extra column select headers appending on data change

rogueldr6rogueldr6 Posts: 8Questions: 2Answers: 0

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

  • tangerinetangerine Posts: 3,354Questions: 37Answers: 394

    Your test case has a console error: DTscript.js is not found (404).

  • kthorngrenkthorngren Posts: 20,545Questions: 26Answers: 4,818
    Answer ✓

    You need to use .empty() like this example.

    Kevin

Sign In or Register to comment.