Responsive adds extra columns to detail row upon expanding
Responsive adds extra columns to detail row upon expanding
joshmouch
Posts: 1Questions: 1Answers: 0
I'm using the newest version of DataTables and Responsive.
When a column is removed, an expand icon is added to the row to view the removed column as a detail.
However, that "detail row" that is created has a colspan that is always equal to however many columns you started with instead of how many are actually visible.
This causes rendering issues.
For example, you might end up with this:
<table>
<tr>
<th style="display:none;">First</th>
<th>Second</th>
</tr>
<tr>
<td style="display:none;">Test1</td>
<td>Test2</td>
</tr>
<tr class="child"><td class="child" colspan="2"><ul data-dtr-index="1">....</ul></td></tr>
</table>
Note the colspan="2" that should actually be colspan="1".
How do I fix this?
This discussion has been closed.