Combobox: fix primary icon visibility

The primary icon for a Combobox was never visible if a value was
selected because we were always attempting to use the icon for that item
even if it didn't have one.
This commit is contained in:
Elijah Duffy
2026-04-08 17:39:04 -07:00
parent e994d8e232
commit 337c2a50b3

View File

@@ -654,9 +654,9 @@
>
{#if loading}
<Spinner class="stroke-sui-accent! -mt-0.5" size="1em" />
{:else if useHighlighted && highlighted}
{:else if useHighlighted && highlighted && highlighted.icon}
{@render optionIcon(highlighted)}
{:else if value}
{:else if value && value.icon}
{@render optionIcon(value)}
{:else if icon}
{#if typeof icon === 'function'}