Et2LinkAppSelect: Fix displayed icon did not change when value changed

This commit is contained in:
nathan 2022-09-06 11:11:13 -06:00
parent bdee948842
commit 6b4a16357f
2 changed files with 1 additions and 5 deletions

View File

@ -83,8 +83,6 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select)
// Select options are based off abilities registered with link system // Select options are based off abilities registered with link system
this._reset_select_options(); this._reset_select_options();
this._handleChange = this._handleChange.bind(this);
} }
set onlyApp(app : string) set onlyApp(app : string)
@ -175,7 +173,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select)
super.value = new_value; super.value = new_value;
} }
private _handleChange(e) _handleChange(e)
{ {
// Set icon // Set icon
this.querySelector("[slot='prefix']").setAttribute("src", this.value + "/navbar"); this.querySelector("[slot='prefix']").setAttribute("src", this.value + "/navbar");

View File

@ -328,14 +328,12 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
// Missing any of the required attributes? Now we need to take it out. // Missing any of the required attributes? Now we need to take it out.
if(!this.searchEnabled && !this.editModeEnabled && !this.allowFreeEntries || this.readonly) if(!this.searchEnabled && !this.editModeEnabled && !this.allowFreeEntries || this.readonly)
{ {
this._unbindListeners();
this.querySelector(".search_input")?.remove(); this.querySelector(".search_input")?.remove();
return; return;
} }
// Normally this should be handled in render(), but we have to add our nodes in // Normally this should be handled in render(), but we have to add our nodes in
this._addNodes(); this._addNodes();
this._bindListeners();
} }
} }