From 64fd79b788d2e65f56378c51ef5fd74abc2278dd Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 23 Jul 2024 16:13:58 -0600 Subject: [PATCH] Et2Tree: Fix searching options did not search children properly --- api/js/etemplate/Et2Tree/Et2Tree.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index e7d06db87a..55e0c2fcc7 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -476,7 +476,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) { if(_id == undefined){debugger;} // TODO: Look into this._search(), find out why it doesn't always succeed - return this._search(_id, this._selectOptions) ?? this.optionSearch(_id, this._selectOptions, 'value', 'children') + return this._search(_id, this._selectOptions) ?? this.optionSearch(_id, this._selectOptions, 'id', 'item') } /** @@ -553,7 +553,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) this.refreshItem(_id, null) } else*/ { - let item = this.getNode(_id) + let item = this.getNode(_id); return this.handleLazyLoading(item).then((result) => { item.item = [...result.item] this.requestUpdate("_selectOptions")