Hi to all, I’m new to webix and stucking on (perhaps) a simple solution to store, load, bind Button config.
I’m looking for a way to store the config (disabled, value, etc…) of some buttons into JSON (localstorage) to load them later again.
Is there a prefered way to sync the data or should i loop over the JSON Object to get and set the config?
Hi @suetti
Could you, please, elaborate a bit more on what you want to achieve?
You can access the config like that: $$("id").config and assigned it to a constant
OK, Let’s say I create a “Form Wizzard” with an accordion and I have several columns which contains Buttons to go forward and backwards. The columns are disabled by default and if i click “forward” the next column is enabled and get expanded. It should be possible to store and load the actual state of each columns. Can i bind the enabled Config that it is in sync or should i iterate over each column and store the $$(‘colid’).config Config.
Hi @suetti ,
In case with accordion you can use onAfterExpand and onAfterCollapse methods, there retrieve state of changing column and add it to the local storage.
If the values are present in the local storage, you can use them in the configuration during initialisation.
Please, check the snippet: Code Snippet
OK Thank you i solved it this way .