This commit is contained in:
Timothy Jaeryang Baek
2025-09-12 20:35:14 +04:00
parent 6b69c4da0f
commit 06a6855f84
2 changed files with 15 additions and 1 deletions
@@ -159,6 +159,20 @@
await tick();
});
const onKeyDown = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
select();
}
};
onMount(() => {
window.addEventListener('keydown', onKeyDown);
});
onDestroy(() => {
window.removeEventListener('keydown', onKeyDown);
});
</script>
<div class="px-2 text-xs text-gray-500 py-1">