Responsive Plugin: Is there any good way to maintain state across responsive hide/shows for posting?
Responsive Plugin: Is there any good way to maintain state across responsive hide/shows for posting?
Currently we're using latest dt and responsive releases with server side processing tables. Though what I've found is that the control states are not pushed back to the data on hide/show.
On occasion our groups will use control heavy datatables that might include editable columns as part of the responsive set that will be collapsed in the child set.
Is there any other potential way apart from feeding into the column state events and hitting the _fnGetCellData and _fnSetCellData's manually similar to the stock responsive rendered code to retain the state across show/hides?
Simple switch of the responsive column to a textbox in datatables live that will clear out when hiding/showing: http://live.datatables.net/geyuqezo/
Answers
Just to check I understand correctly - the problem is that when you change a columns state from being in the child row to being in the main table, the value in the input element is removed?
Unfortunately yes, that is how Responsive works at the moment as the elements shown in the child row are clones of the original. This makes it unsuitable for used with input elements at this time I'm afraid.
I have tried experimenting with reusing the same DOM elements so this wouldn't be an issue, but it was proving to be surprisingly difficult, so I set it aside for the time being!
Allan