Id's for th elements are not removed on cloned header / footer table.

Id's for th elements are not removed on cloned header / footer table.

dhobidhobi Posts: 2Questions: 2Answers: 0

Hi there,

Similar to this topic https://datatables.net/forums/discussion/32964/the-table-id-is-lost-when-i-user-the-scrollx-option but just the other way around: I expect all the id's being removed in a cloned table (header / footer).

My use case:
To easily find the columns by id, I give each th an id attribute.

Outcome:
For tables with scrollx enabled, the column id's appear multiple times on the page.

My try to understand what's going on (source code):
While the table element is cloned (flat) and freed from the id attribute, the thead/tfoot elements are appended to it without cloning them first. Removing their id's would therefore also remove the ids from the "original" table?

I understand that the lack of cloning for thead/tfoot elements could be by design / intended. I just wanted to make sure this is really the case!

Thanks for your help/clarification!
Daniel

This discussion has been closed.