Tfoot is missing in tables drived by objects.

Tfoot is missing in tables drived by objects.

MausinoMausino Posts: 61Questions: 19Answers: 0

Link to test case:
https://jsfiddle.net/qfmkcg0y/

I'am fighting with this little problem. As you can see on example, How can i add footer there ??? I tried add <tfoot></tfoot> inside the table but doen't help.

I want search by each column as you have in example codes... but without footer is not possilble, because if i inspect code from my test case (also in my program) there is only thead and tbody of table but not the tfoot.

Thank you.

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

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,371Questions: 26Answers: 4,957

    Datatables doesn't add a footer. The columns.title option only creates the thead. You will need to add the footer in the HTML or use Javascript or jQuery to programmatically add the footer before initializing Datatables.

    Kevin

  • MausinoMausino Posts: 61Questions: 19Answers: 0

    https://jsfiddle.net/Mausino/zp3gu1ds/2/

    Hi @kthorngren i tried and i added <tfoot><tfoot> inside the table. But the result is the same... if you inspect code you will see that in table is now tfoot but is empty as in my example.

    Is somewhere documentation where i find way how to have "normal" footer with column names inside it ?

    Thank you :)

  • allanallan Posts: 63,564Questions: 1Answers: 10,479 Site admin
    Answer ✓

    Not only does it not add the footer element it also doesn't add the footer cells. You need to define the whole footer as Kevin indicated: https://jsfiddle.net/kavy16qw/ .

    Allan

  • MausinoMausino Posts: 61Questions: 19Answers: 0

    Thank you for your answer. I can do this now by some code.. but i think should be fine if will generate columns also for footer as did for header.

    Who want disable footer or want hide it.. it's easier by css as create footer by code :)

  • allanallan Posts: 63,564Questions: 1Answers: 10,479 Site admin

    It will. One day... Its on my todo list :)

    Allan

Sign In or Register to comment.