Commit 133f223d authored by Aryan Kothari's avatar Aryan Kothari
Browse files

feat: enter selects first model in list

parent 1e7a364c
...@@ -238,6 +238,13 @@ ...@@ -238,6 +238,13 @@
class="w-full text-sm bg-transparent outline-none" class="w-full text-sm bg-transparent outline-none"
placeholder={searchPlaceholder} placeholder={searchPlaceholder}
autocomplete="off" autocomplete="off"
on:keydown={(e) => {
if (e.code === 'Enter' && filteredItems.length > 0) {
value = filteredItems[0].value;
show = false;
}
}}
/> />
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment