Table footer disappears at second draw

Table footer disappears at second draw

OoypunkOoypunk Posts: 2Questions: 1Answers: 0

This one stumps me, because we use DataTables on several sites, but only here this problem arises. Version number is 1.10.10, the configuration is, in parts, much older than that.

A very short introduction: in the initComplete function a tfoot element is created and added to the table, and this is shown as it is supposed to. We use the initComplete, because the content is loaded with Ajax.

The problem: as soon as a second draw is done (for example, a differend page length is chosen), then the table is re-drawn, but in the process, it removes the tfoot element.

Is it supposed to do that? Can I stop it from doing that?
On a side-note, maybe related: why does the table get the "no-footer" class?

Please tell me what more information I can give, I don't know what would be relevant in this. Thanks in advance.

Answers

  • OoypunkOoypunk Posts: 2Questions: 1Answers: 0

    Addition: moving the adding of the tfoot element to drawCallback works, but only AFTER the first draw.

  • jr42.gordonjr42.gordon Posts: 305Questions: 2Answers: 49

    Why add your tfoot in the initComplete? Just add the tfoot to your HTML makeup.

This discussion has been closed.