fix getValue() for single tree

This commit is contained in:
milan 2024-03-06 16:27:19 +01:00
parent 1533f1321d
commit 317f2fdbb9

View File

@ -356,13 +356,17 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
*/
getValue()
{
if(this.multiple){
let res:string[] = []
if(this.selectedNodes?.length)
for (const selectedNode of this.selectedNodes)
{
res.push(selectedNode.id)
}
return res
return res}
else {
this.getSelectedItem().id
}
}
/**