Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[md-input] Can't listen native events #371

Closed
jtouzy opened this issue Jan 20, 2017 · 3 comments
Closed

[md-input] Can't listen native events #371

jtouzy opened this issue Jan 20, 2017 · 3 comments

Comments

@jtouzy
Copy link

jtouzy commented Jan 20, 2017

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 ?

@vivescere
Copy link

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

@johanbove
Copy link

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>

@johanbove
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants