row.child.isShown() returns opposite of what API states (I think)
row.child.isShown() returns opposite of what API states (I think)
dlanz38
Posts: 17Questions: 4Answers: 0
I'm was trying to hide/show child rows according to this example: https://datatables.net/examples/api/row_details.html
But I think row.child.isShown()
returns the opposite of what the API states. It returns true when the child row is hidden and false when it is shown.
https://datatables.net/reference/api/row().child.isShown()
Am I just reading this wrong?
Here is an example:
http://live.datatables.net/cehufuse/14/edit
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You are using the Responsive extension to show and hide the child rows. You aren't using the
row().child()
APIs for this. I suspect that responsive is showing the row before your event executes theconsole.log(row.child.isShown());
statement. If you want to use child rows instead of responsive then you will want to follow the example you linked to and use therow().child()
API to build your child row display.Kevin
Ah, didn't realize there was a difference between the two. I figured there was something I was missing. Thanks for the clarification