How to trigger a method from key #1153
-
Hi, https://codepen.io/sqllyw/pen/jOVKGXy?editors=1111 what I'm missing here? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
KevinBatdorf
Mar 3, 2021
Replies: 1 comment 1 reply
-
You used But probably better like this: <form @submit.prevent='search_proc()'>
<input type="text" x-model="search">
<button>search</button>
</form> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sqllyw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You used
keydown.cmd.enter
which requires you press command + enter.But probably better like this: