refreshItem directly returns if the item is not currently displayed in the tree

This commit is contained in:
milan 2024-07-24 15:57:54 +02:00
parent cb87d60427
commit 111bb27f34

View File

@ -554,6 +554,8 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
} else*/ } else*/
{ {
let item = this.getNode(_id); 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) => { return this.handleLazyLoading(item).then((result) => {
item.item = [...result.item] item.item = [...result.item]
this.requestUpdate("_selectOptions") this.requestUpdate("_selectOptions")