Topic: mdb-input - handling keyboards events

enviaya pro asked 4 years ago

Hi, How can I handle enter event for mdb-input?

I have this code and it doesn't work.

<mdb-input :label="$t('search.search_by')" v-model="localQuery.queryString" v-on:keyup.enter="search()"/>

But if I change mdb-input to input:

<input :label="$t('search.search_by')" v-model="localQuery.queryString" v-on:keyup.enter="search()"/>

everything works as expected.

Could you please help resolve this case? It's critical feature for me. Thank you.

enviaya pro commented 4 years ago

Hi, again.Sorry, I resolved this case:

<mdb-input :label="$t('search.search_by')" v-model="localQuery.queryString" @keydown.enter.native="search()"/>

Voon See Hong pro commented 3 years ago

this works. thank you!

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.5.0
  • Device: Laptop
  • Browser: Chrome, Safari
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No