Skip to content

How to trigger a method from key #1153

Answered by KevinBatdorf
sqllyw asked this question in 1. Help
Discussion options

You must be logged in to vote

You used keydown.cmd.enter which requires you press command + enter.

But probably better like this:

<form @submit.prevent='search_proc()'>
  <input type="text" x-model="search">
  <button>search</button>
</form>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sqllyw
Comment options

Answer selected by sqllyw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants