diff --git a/src/renderer/src/stories/List.ts b/src/renderer/src/stories/List.ts index e2f72d87d..7a6a3bb21 100644 --- a/src/renderer/src/stories/List.ts +++ b/src/renderer/src/stories/List.ts @@ -58,6 +58,10 @@ export class List extends LitElement { items: { type: Array, reflect: true + }, + emptyMessage: { + type: String, + reflect: true } }; } diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js index 5ef34442c..93938a8ca 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js @@ -77,6 +77,8 @@ export class GuidedStructurePage extends Page { async updated() { const selected = this.info.globalState.interfaces; + if (Object.keys(selected).length > 0) this.list.emptyMessage = "Loading valid interfaces..."; + this.search.options = await fetch(`${baseUrl}/neuroconv`) .then((res) => res.json()) .then((json) => @@ -106,6 +108,7 @@ export class GuidedStructurePage extends Page { this.list.add({ ...found, key }); // Add previously selected items } + this.addButton.removeAttribute("hidden"); super.updated(); // Call if updating data } @@ -114,6 +117,7 @@ export class GuidedStructurePage extends Page { this.list.style.display = "inline-block"; this.list.clear(); this.addButton.style.display = "block"; + this.addButton.setAttribute("hidden", ""); return html`