{#each selectedDocuments as doc (doc.id)} {/each}
picker.close()}>
{#each selectedDocuments as doc (doc.id)} {formatDocumentOption(doc)} {/each} updateDropdownPosition()} placeholder={placeholder} class="min-w-[120px] flex-1 border-none bg-transparent p-1 text-sm outline-none focus:ring-0" />
{#if picker.isOpen && (filteredResults.length > 0 || picker.loading || picker.error)}
{#if picker.loading}
{m.comp_multiselect_loading()}
{:else if picker.error} {:else} {#each filteredResults as doc (doc.id)}
selectDocument(doc)} onkeydown={(e) => e.key === 'Enter' && selectDocument(doc)} role="button" tabindex="0" > {formatDocumentOption(doc)}
{/each} {/if}
{/if}