Vue-material: [md-input] Can't listen native events

Created on 20 Jan 2017  路  3Comments  路  Source: vuematerial/vue-material

On md-input, developers can't listen input's native events like "v-on:focusout", "v-on:keyup", because of the "md-input" wrapper. Can we $emit the events when they're sended ?

I think it could be a performance problem (too much $emit phase) so I prefer ask for the feature before proposing a pull request.

Maybe the developer can register events that he needs and md-input can registers them on the fly ?

What do you think ?

Most helpful comment

Never mind. I found the correct event notation; Thanks!

<md-input-container>
   <label>Vorname</label>
   <md-input v-model="firstName" @keyup.enter.native="getStep(3)"></md-input>
 </md-input-container>

All 3 comments

If I remember correctly, you can use @focus.native.

I had the same question. Thank you for replying @vivescere . Can you please elaborate a little on how this would work? I'm trying this, but the event is not fired:

  <md-input-container>
     <label>Vorname</label>
     <md-input v-model="firstName" @keyup.enter="getStep(3)"></md-input>
  </md-input-container>

Never mind. I found the correct event notation; Thanks!

<md-input-container>
   <label>Vorname</label>
   <md-input v-model="firstName" @keyup.enter.native="getStep(3)"></md-input>
 </md-input-container>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

xinzhanguo picture xinzhanguo  路  3Comments

markus-s24 picture markus-s24  路  3Comments

Leshgan picture Leshgan  路  3Comments

tridcatij picture tridcatij  路  3Comments

bryanspearman picture bryanspearman  路  3Comments