2 Datatables with Datacollection and Filter

Hello,

https://snippet.webix.com/3rtdjxpo

If you filter in the second datatable the column “Released” and afterwards edit the column “Film Title” in the first datatable, the filtering of the 2nd datatable is reset.
How to achieve that the filtering is preserved?

Thanks,
Martin

Hello,

In view of the fact that datatables are updated after editing, therefore, filtering is reset.

To save the state of datatable I can recommend you to use onAfterFilter event (occurs after datatable was filtered) . To save the current datatable state to the local storage you should call the getState method:
webix.storage.local.put("state", $$('d2').getState()

To restore the saved state of datatable it possible to use onAfterEditStop (fires after the edit operation is finished) . Also, you need to call the setState method:

var state = webix.storage.local.get("state");
			if (state)
				$$('d2').setState(state);

More info you can find here.
Please check the sample: Code Snippet