{ if (e.key === 'Enter' && enterConsumed) { e.preventDefault() e.stopPropagation() enterConsumed = false return } onkeyup?.(e) }, onfocus: onInputFocus, onblur: onInputBlur }} /> {#if ghostText && hasFocus && !cycleMode} {/if}
{#if showList}
{cycleMode ? 'Tab to cycle' : 'Tab'} {#each displayedOptions as opt, i (opt.name)} e.preventDefault()} onclick={() => selectOption(opt)} > {opt.name}/ {/each}
{/if}