Child rows - StateSave not recalling when expanded

Child rows - StateSave not recalling when expanded

glimpsed_chaosglimpsed_chaos Posts: 113Questions: 22Answers: 4

Link to test case: https://live.datatables.net/cebuvede/2/edit?html,js,output
Error messages shown: None.
Description of problem: I have followed the examples for Child rows with StateSave and pretty certain I have everything implemented as it should be.

However, in my test case when I expand child rows and check the local storage I can see the expanded child row's id is present in "childRows" array. Doing this to verify it is being saved. But the childRows fail to be recalled (reopened) and disappear from the local storage after refresh/reload of page.

Any ideas on what I may have missed?

Thanks for your time.

Answers

  • glimpsed_chaosglimpsed_chaos Posts: 113Questions: 22Answers: 4

    Few things -

    On the 'Child rows with StateSave' page it says "The user must add a listener for the requestChild.dt to display the row in whatever format that they please."

    The link under "requestChild.dt" returns a 404 error.

    After finding the requestChild event and seeing that it states "The listener must also be set before the table initialisation,"

    I then realized the example 'Child rows with StateSave' page does not show the listener before the table initialisation.

    My test case now works - https://live.datatables.net/cebuvede/5/edit?html,js,output

Sign In or Register to comment.