Get current Data

Hi guy’s,

I’m struggling with an issue at the tree view. I need to save at the localstorage a copy of the data array with the updated items. This means that if there Is checked or intermediate items at the tree, I need the array that I inserted in the data attribute at the beggining updated with these values.

How can I do this?

Thank you.

Hello,

You can iterate Tree data with the each method of its inner datastore and pick items with the checked or indeterminate properties set to true.

var checked = [];
$$("mytree").data.each(function(obj){
    if(obj.checked || obj.indeterminate)
       checked.push(obj);
});

Then, you can use webix.storage.local helper to push the data to the local storage and access them.

Please, check the following snippet: https://webix.com/snippet/929f4140

Hi Helga

How to get the current date() in webix toolbar

Thank’s & Regards
Deepak

Could you please clarify your question?