1} on:click={editable ? open : null} > {#each values as val} {@const color = optionColors[val] || getOptionColor(val)} {#if color}
{val}
{:else}
{val || ""}
{/if} {/each}
{#if editable}
{/if} {#if isOpen}
e.stopPropagation()} use:clickOutside={close} > {#each options as option, idx} {@const color = optionColors[option] || getOptionColor(option)}
toggleOption(option)} class:focused={focusedOptionIdx === idx} on:mouseenter={() => (focusedOptionIdx = idx)} >
{option}
{#if values.includes(option)} {/if}
{/each}
{/if}