No data (dataTables_empty) colspan problem

No data (dataTables_empty) colspan problem

svashtarsvashtar Posts: 8Questions: 3Answers: 0
edited February 2016 in General

Hi,

When there is no records in the table, the dataTables_empty td is created with colspan="0".
I don't know why, but this only spans 1 column and the design breaks.

If i manually set it (with developer tools) to colspan="100%" it is ok.

How do i fix this permanently?

This question has an accepted answers - jump to answer

Answers

  • svashtarsvashtar Posts: 8Questions: 3Answers: 0

    I only recently upgraded to a newest version of DT, and I did not have problems before that. It seems like TBODY>tr>td on empty table was introduced recently?

    How can i remove that and go back to how it was?

    I would like to have a centered text, not just inside first column.

  • svashtarsvashtar Posts: 8Questions: 3Answers: 0

    OK so i tested it a bit more and this only happens when table is initialized.
    If i have data in the table and do a simple search that will return no entries, everything is ok. Since i have a save state option enabled, when i reload a page and table is generated again (this time with saved state of search) and it return no records, the colspan on empty table is wrong (0).

    This should be somehow properly calculated and return a correct number of columns for the colspan.

    Is this normal?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Sounds like a bug caused by this commit.

    Let me have a think about how to fix this and get back to you. Thanks for the heads up.

    Allan

  • svashtarsvashtar Posts: 8Questions: 3Answers: 0

    Great, thx Allan.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Fixed here. Thanks for letting me know about that issue.

    The nightly is rebuilding at the moment with this fix. I expect DataTables 1.10.12 to drop in the next month or two depending on the fixes that are required - this one will bring that date closer since it is a visible issue.

    Regards,
    Allan

  • littlemjulittlemju Posts: 2Questions: 0Answers: 0

    Will it be included in the next release? 1.10.11 does not seem to have this fix.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Yes it will be. The error was introduced in 1.10.11. It will be fixed in 1.10.12.

    Allan

  • littlemjulittlemju Posts: 2Questions: 0Answers: 0

    Thanks for the info, Allan!

  • thejatheja Posts: 1Questions: 0Answers: 0
    edited April 2016

    Hey Allan, When is the 1.10.12 set to release?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Later this month. Probably the week after next.

    Allan

  • d1337d1337 Posts: 2Questions: 0Answers: 0

    Any news on 1.10.12?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Currently planning for this week :-). A few loose ends I need to wrap up first though.

    Allan

  • d1337d1337 Posts: 2Questions: 0Answers: 0

    Thank you Allan!

  • insmodinsmod Posts: 1Questions: 0Answers: 0

    Just wanted to let everyone know that rather than waiting for the new version of DT, I just replaced the function _fnVisbleColumns for the new one in the commit referenced by allan and everything seems to be working just fine. Thanks a lot for all your help!

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Or use the nightly version which contains the fix.

    Allan

  • jackalbrightjackalbright Posts: 14Questions: 4Answers: 0

    I find that this still happens if I have more than one DT on a page. The first displays but the 2nd and 3rd ones still display the message in one column.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    If you could link to a page showing the issue that would be great.

    Allan

  • raviparikkhraviparikkh Posts: 1Questions: 0Answers: 0

    Any updates about this? I am still facing this issue.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Per my last response in this thread, if you post a link to the page showing the issue we can look into the problem.

    Allan

This discussion has been closed.