DataTables losing child-rows / hidden-details visibility-state on reload

DataTables losing child-rows / hidden-details visibility-state on reload

alexanderdoealexanderdoe Posts: 1Questions: 0Answers: 0

It seems that the behaviour of the responsive-design-extension is under different DataTables-configuration not consistent and possibly faulty.

The following examples use the following DataTables-features:
- Loading data via ajax (Server-side processing)
- Extension "Responsive-Design"
- Row-ID

The first example uses the default setting for responsive-design.
http://live.datatables.net/xumidoqe/1/edit?html,js,output

Steps to reproduce:
1. Shrink the browser-window, so that some of the columns will be hidden and moved to the collapsed child-rows (hidden details)
2. Click the child-rows-toggle-button to display the child-rows
3. Click the button "Reload Table"

The behaviour is that the visibility-state of the child-rows is preserved between the ajax reloads.

The second example uses the responsive-design-setting for the immediate display of the hidden details / child-rows but without use of the row-ID feature (ajax: "/ssp/server_processing.php").
http://live.datatables.net/zizawuti/1/edit?html,js,output

Steps to reproduce:
1. Shrink the browser-window, so that some of the columns will be moved to the now direct displayed child-rows.
2. Click the button "Reload Table"

The behaviour is that the visibility-state of the child-rows is preserved between the ajax reloads.

The third example uses the responsive-design-setting for the immediate display of the hidden details / child-rows and the row-ID feature. ("ajax": "/ssp/ids-objects.php")
http://live.datatables.net/qecoziwi/1/edit?html,js,output

Steps to reproduce:
1. Shrink the browser-window, so that some of the columns will be moved to the now direct displayed child-rows.
2. Click the button "Reload Table"

In contrast to the first and second example, the behavior is different now.
The behaviour is that the visibility-state of the child-rows is not continuous preserved between the ajax reloads.
With each click on the button "Reload Table" the visibility-state of the child-rows is toggled.

This is probably an bug.

What changes must be made to the third example to preserve the visibility-state of the child-rows between the table-reloads?

Sign In or Register to comment.