Responsive table - responsive indicator not disappearing and issues with header rows
Responsive table - responsive indicator not disappearing and issues with header rows

Link to test case: https://live.datatables.net/voheroho/3/
I actually have two related issues:
1: When I expand the output area and all the columns are visible, the expand/collapse indicator is supposed to collapse but it doesn't.
2: I can't get the demo to replicate this issue because I can not get the expand/collapse indicator column to disappear, but in our pages when that column does disappear it also takes the 'Table Header' row with it. This happens as a result of either expanding the page until its not needed or when hiding enough columns that the rest fit. This also only happens when DataTables itself removes this column, not when I use programmatic control to remove it.
I've tried to replicate as much as possible what we use but I can't just paste our code.
Answers
1) Interesting. It is related to the multi-row header. I'll need to look into that. Thanks for the test case.
2) Perhaps when I fix the first issue, this will also be resolved...
Allan
A flash of inspiration... We can have Responsive discount the spanning cell at the top of the table by using
titleRow
. In this case:resolves the error you were seeing in (1). Updated test case: https://live.datatables.net/voheroho/9/edit .
Possibly it might solve (2) as well, but I can't see that error, so if you could let me know, that would be great.
Depending on your use case, you might want to consider using a
caption
if it is to just table your table (caption
). It is more semantically correct in HTML.Allan
Hi Allan, looks like that solves the first problem!
As for the second, I opened the updated test case you gave me and see the exact problem I was talking about.
When I expand the output area, ie making more room for the columns, the expand/collapse indicator eventually disappears (expected). What's not expected is that the Table Header suddenly disappears as well with it.
With the first col:

After expanding:

Please let me know if this is still unclear
Hmm - yes I see what you mean. I'll take a look as soon as I can.
Allan
I've been looking into this, and unfortunately, it isn't going to be trivial to fix. The workaround for the moment is to add a
th
for the control column: https://live.datatables.net/voheroho/13/edit .Or, as I mentioned, use a table caption if it is for labelling the table.
Allan