diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index b758e4e7c2..a297dbeed2 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -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 + } } /**