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

q-input - handler() function's "this" is undefined #840

Closed
TKafassis opened this issue Aug 28, 2017 · 1 comment
Closed

q-input - handler() function's "this" is undefined #840

TKafassis opened this issue Aug 28, 2017 · 1 comment

Comments

@TKafassis
Copy link

Hello, I am trying to put + and - signs on q-input number to make it like it was before, but it seems like handler() function's "this" is undefined and not bind to Vue instance, is there a workaround?

@rstoenescu
Copy link
Member

Hi,

Read about ES6 arrow functions and understand how scoping works with them.

handler () {
   // "this" refers to the scope of this block
}

handler: () => {
   // "this" refers to outer scope, so possibly your Vue component
}

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

2 participants