row().child().show()

row().child().show()

kaseykrehbielkaseykrehbiel Posts: 18Questions: 2Answers: 0

I'm using row().child(<some data>).show() to show some child data and row().child().hide() to hide the data.

.child(some data) calls an AJAX method that I only want to have to call once if the row is expanded multiple times.

row().child(<some data>).show() displays the data every time but it also reloads the AJAX method.

Unfortunately, row().child().show() does not display the data the second time, although row.child() (as seen in a console.log) does contain the data I want to display.

What am I missing?

Answers

  • kaseykrehbielkaseykrehbiel Posts: 18Questions: 2Answers: 0

    For now, I have solved this by doing the following:

    $(tableRow).data('child', row.child(<some data>).show());

    then when I want to re-show the child, I do this:

    $(tableRow).data('child').show();

    For some reason that works, whereas simply recalling the child object does not.

    Please let me know if there is a better way of addressing this.

This discussion has been closed.