diff --git a/bun.lock b/bun.lock index da079b8e..9ea8e008 100644 --- a/bun.lock +++ b/bun.lock @@ -688,7 +688,7 @@ }, "packages/ui": { "name": "@wrnexus/ui", - "version": "0.8.63", + "version": "0.8.64", "dependencies": { "@wrnexus/core": "workspace:*", }, diff --git a/packages/ui/components/AdvancedSelect.wrn b/packages/ui/components/AdvancedSelect.wrn index 1042c55a..efb5b41a 100644 --- a/packages/ui/components/AdvancedSelect.wrn +++ b/packages/ui/components/AdvancedSelect.wrn @@ -304,7 +304,7 @@ component AdvancedSelect { aria-label="{selectedOptionsLabel}" data-show="multiple && selectedTemplate !== 'count' && selectedTemplate !== 'text' && selectedCount() > 0" > - {#each allOptions() as option} + {#each multiple && selectedTemplate !== 'count' && selectedTemplate !== 'text' ? selectedOptions() : [] as option} {#if optionTemplate === "icon" && option.icon}{/if} {#if optionTemplate === "avatar" && option.avatar}{/if} @@ -371,7 +371,7 @@ component AdvancedSelect { role="listbox" aria-multiselectable="{multiple}" > - {#each groups as group} + {#each open ? groups : [] as group} {#if visibleOptions(group.options || []).length}
{group.label}
@@ -402,7 +402,7 @@ component AdvancedSelect { {/if} {/each} - {#each visibleOptions(options) as option} + {#each open ? visibleOptions(options) : [] as option}