From 111bb27f341b8b6d8e7f1eed212f5bd7a2ae3273 Mon Sep 17 00:00:00 2001 From: milan Date: Wed, 24 Jul 2024 15:57:54 +0200 Subject: [PATCH] refreshItem directly returns if the item is not currently displayed in the tree --- api/js/etemplate/Et2Tree/Et2Tree.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index 857caa37e9..28f557c503 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -554,6 +554,8 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) } else*/ { let item = this.getNode(_id); + // if the item does not exist in the tree yet no need to refresh + if(item == null) return return this.handleLazyLoading(item).then((result) => { item.item = [...result.item] this.requestUpdate("_selectOptions")