From 6b4a16357fa2f71f717b479b17c5a9ac8cbea596 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 6 Sep 2022 11:11:13 -0600 Subject: [PATCH] Et2LinkAppSelect: Fix displayed icon did not change when value changed --- api/js/etemplate/Et2Link/Et2LinkAppSelect.ts | 4 +--- api/js/etemplate/Et2Select/SearchMixin.ts | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts index ac18f24256..47d9844d7f 100644 --- a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts +++ b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts @@ -83,8 +83,6 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) // Select options are based off abilities registered with link system this._reset_select_options(); - - this._handleChange = this._handleChange.bind(this); } set onlyApp(app : string) @@ -175,7 +173,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) super.value = new_value; } - private _handleChange(e) + _handleChange(e) { // Set icon this.querySelector("[slot='prefix']").setAttribute("src", this.value + "/navbar"); diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index c01793d17b..a918b17f6a 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -328,14 +328,12 @@ export const Et2WithSearchMixin = >(superclass // Missing any of the required attributes? Now we need to take it out. if(!this.searchEnabled && !this.editModeEnabled && !this.allowFreeEntries || this.readonly) { - this._unbindListeners(); this.querySelector(".search_input")?.remove(); return; } // Normally this should be handled in render(), but we have to add our nodes in this._addNodes(); - this._bindListeners(); } }