Datatable in modal - Accumulation of data
Datatable in modal - Accumulation of data

Hello.
I have a modal that loads a datatable via Ajax every time that I push the button. But, when I open and then close the modal, If I push the button again, I see that the header columns has two times the sort icon. If I close and reopen again, three times, and so on.
For example, in this case, I did this four times:
So, when I close the modal I capture the event because I want to destroy the datatable. I used this: $('#table').dataTable().fnDestroy(); but it doesn't work and problem persist.
¿Any ideas?
This question has an accepted answers - jump to answer
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi Colin, glad to see you
Well, I look for make an example via fiddle
Hi again!
Don't worry Colin, I fix the problem. It was a DOM error, not datatable.
Thanks!
Hi ferran, i got this error right now. can i get to know, how could you solve it?
@idhardzlfkr - if you can link to a test case, we're happy to take a look,
Colin