{ open = true; }} onkeydown={onKeydown} onfocus={() => { open = true; }} onblur={() => { // hide after a tick so click on an option still registers setTimeout(() => { open = false; }, 150); }} /> {#if open && results.length > 0} {/if}