How can you hide the expansion icon for a parent row without children?
How can you hide the expansion icon for a parent row without children?
Kondele
Posts: 1Questions: 1Answers: 0
I'm trying to utilize the Datatables with Child Rows example shown here:
https://jsfiddle.net/nnb97rh9/3/
How can I control the display of the expansion icon so that it is only displayed on parent rows that have child rows. i.e. if a parent does not have child rows, how can I hide the exapnsion icon?
Thanks!
This discussion has been closed.
Answers
You have
details-control
being added to the first cell in every row at the moment. You'd need to selectively assign that class name based on whatever logic you are using to determine if there is child information or not.I would suggest using
createdRow
for that, or possiblyrowCallback
if it is possible for details to be added after the row has been created.Allan