From 01a08447cb227f7fd0f8d9c82d2b187bd8552aff Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 7 Oct 2022 15:29:52 -0600 Subject: [PATCH] Fix selecting an app changed icon in first entry instead of displayed icon --- api/js/etemplate/Et2Link/Et2LinkAppSelect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts index 47d9844d7f..1b0d4130a8 100644 --- a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts +++ b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts @@ -105,7 +105,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) super.connectedCallback(); // Set icon - this.querySelector("[slot='prefix']").setAttribute("src", this.value + "/navbar"); + this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.value + "/navbar"); if(!this.value) { @@ -176,7 +176,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) _handleChange(e) { // Set icon - this.querySelector("[slot='prefix']").setAttribute("src", this.value + "/navbar"); + this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.value + "/navbar"); // update preference let appname = "";