{#each suggestionsItems as suggestion, index} setSelectedAndActive(index)} on:mouseup={() => { selectIndex(index); chooseSelected(); }} on:mouseenter={(event) => selectIfMousedown(event, index)} on:mouseleave={() => (active = false)}>{suggestion} {/each}