Hello,
I’m trying to store some configurations that I created in the pivot table, so I’d be able to navigate between them. I understood how to create predefined structures and then sending them as parameter to
{ view:“list”, id:“structures”, data:structures, template:“#label#”, select:true }
However, I can’t seem to store additional structures after init.
Example:
- load pivot, predefined structures appear under “My configurations”
- Change configuration via [Click to configure] button in the pivot itself, e.g. remove some filters and values.
- use
var structure = $$(“pivot”).getStructure();
to get the new structure. - try
$$(“structures”).add(structure,0);
$$(“structures”).refresh();
I can now see the new structure in the list, but I can’t click on it (the attached event onItemClick fails).
The error is:
var str = webix.copy(this.getItem(id).structure);
Uncaught TypeError: Cannot read property ‘length’ of undefined
Seems like this.getItem(id) returns an empty object
Can you suggest a method to store the current structure in the structures list and have the onClick attachment?
Thanks!