After Reinitialize header and body not aligned
After Reinitialize header and body not aligned
anasuryana
Posts: 3Questions: 1Answers: 0
i try upgrade from version 1.13.8 to 2.0.0
after inspecting element there are two colgroup element when after i reinitialize the datatable.
currently i manually remove first colgroup element before i reinitialize datatable.
the code to remove is like this
tblUserInfo.getElementsByTagName('colgroup')[0].remove()
is this the only one way to keep header and body aligned ?
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.
Colin
I had a similar issue related to the misalignment header & body columns.
I resolved it by removing destroy: true from the table init. Also changed the instance retrieval code.
.
https://datatables.net/manual/tech-notes/3#Object-instance-retrieval
@vovarpd If you could link to a test case showing the issue, hopefully I'll be able to fix it rather than needing workarounds. At the moment, I've not seen this bug, so I don't know what is causing it and have zero change of actually fixing it. A test case would really help.
Allan
this is first time i use jsbin and share code. please try
https://jsbin.com/tehicow/1/edit?html,js,output
Got it - thank you! I've committed a fix and it will be in the 2.0.1 drop.
Allan
thank you allan