Merge pull request from thearyadev/feat/enter-to-select-model

feat: enter selects first model in list
This commit is contained in:
Timothy Jaeryang Baek 2024-07-18 13:16:35 +02:00 committed by GitHub
commit 51bdb4cbea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -238,6 +238,13 @@
class="w-full text-sm bg-transparent outline-none"
placeholder={searchPlaceholder}
autocomplete="off"
on:keydown={(e) => {
if (e.code === 'Enter' && filteredItems.length > 0) {
value = filteredItems[0].value;
show = false;
}
}}
/>
</div>