When calling theme_table with an empty rows array but with an 'empty' text set, it will automatically create a row for that empty text. However, the header is already generated before that row is added and thus doesn't use thead because it assumes there is no tbody. The attached patch just reverses the order so that the header properly uses thead when there is an empty row.

CommentFileSizeAuthor
#2 720202.patch1.87 KBnaxoc
table_thead.patch861 byteskkaefer

Comments

effulgentsia’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Makes sense. But let's make sure it stays fixed by having a test.

naxoc’s picture

Status: Needs work » Needs review
StatusFileSize
new1.87 KB

Wrote a small test for this

effulgentsia’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.