Closed pmalouin closed 8 years ago
In the generated css, here are the styles that leave room for the row expansion button:
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child, table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child { position: relative; padding-left: 30px; cursor: pointer; }
These selectors incorrectly match the empty data element (ex. when empty data returned from server):
<tbody> <tr class="odd"> <td valign="top" colspan="5" class="dataTables_empty">No data available in table</td> </tr> </tbody>
The three styles should not be applied (cursor should not be pointer, padding-left messes with the text-align:center of the .dataTables_empty).
cursor
padding-left
text-align:center
.dataTables_empty
Altering the selectors like this should work:
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:not(.dataTables_empty), table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:not(.dataTables_empty) { position: relative; padding-left: 30px; cursor: pointer; }
I also fixed the styling for when the compact class is applied.
compact
Nice one - thanks for this! Are you happy for this to be included under the MIT license?
Yes I am.
Ace - thanks :-)
In the generated css, here are the styles that leave room for the row expansion button:
These selectors incorrectly match the empty data element (ex. when empty data returned from server):
The three styles should not be applied (
cursor
should not be pointer,padding-left
messes with thetext-align:center
of the.dataTables_empty
).Altering the selectors like this should work:
I also fixed the styling for when the
compact
class is applied.