FixedFooter/Header with tabs?

FixedFooter/Header with tabs?

MadBoyEvoMadBoyEvo Posts: 119Questions: 38Answers: 0

Link to test case:

Had to use Codepen as JSFiddle wouldn't show a problem

https://codepen.io/MadBoyEvo/pen/pobVOjg

Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Sorry for a big large HTML but wanted to make sure it pushes FixedFooter.

When this is enabled

"fixedHeader": {
    "header": false,
    "footer": true
},

And you switch to second tab, and back to first, you can see the footer stays on on the first tab that doesn't have a table. What's the proper way (if at all) to prevent that?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin
    edited November 2020 Answer ✓

    Hi,

    You need to call fixedHeader.adjust() when you change tabs - it will detect if the table is visible or not and enable or disable as required.

    Here is a little example - in your case you'd listen for the tab's show event and call it there.

    Allan

This discussion has been closed.