Hello everybody,
I need to put some extra information in each tree node. That is to say: how can I tell the tree item if it is representing something without consulting the database or creating any additional structure?
This is what I want to achieve:
nodeBuilder = (x) => {
return {
id: x.idelement,
label: x.description,
value: x.elementkey,
expanded: x.haschildren,
parentid: x.parentid,
myObj: {firstattr: '1st', myotherattr: 'other'}
};
};
Here, I would like to put myObj
in the tree item and then using it as this.myTree.getItem('item').myObj...
Best regards