Skip to content
Snippets Groups Projects
Commit e5f6b506 authored by Albert Dong's avatar Albert Dong
Browse files

Hitting enter updates the bead generation preview

parent 1b819648
No related merge requests found
...@@ -5,8 +5,16 @@ ...@@ -5,8 +5,16 @@
function requestAPIUpdate() { function requestAPIUpdate() {
dispatch("requestUpdate"); dispatch("requestUpdate");
} }
function handleKeydown(event: KeyboardEvent) {
if (event.code == "Enter") {
dispatch("requestUpdate");
}
}
</script> </script>
<svelte:window on:keydown={handleKeydown} />
<button <button
class="h-10 rounded-full bg-green-400 hover:bg-green-500 active:bg-green-600 mt-2 flex flex-row items-center justify-center" class="h-10 rounded-full bg-green-400 hover:bg-green-500 active:bg-green-600 mt-2 flex flex-row items-center justify-center"
on:click={() => { on:click={() => {
......
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