mdb-input - handling keyboards events


Topic: mdb-input - handling keyboards events

enviaya pro premium asked 4 months 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 premium commented 4 months ago

Hi, again.Sorry, I resolved this case:

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

Please insert min. 20 characters.


Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: Vue
  • MDB Version: 6.5.0
  • Device: Laptop
  • Browser: Chrome, Safari
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No