-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Prevent change #86
Comments
I forked and made a quick fix like this, yes you end up getting a delay in movement on the toggle - but I can add a tiny loader, which is enh. Basically states that if the sync is true, listen to the prop value and don't listen to local click events - which is how it should be |
You can do those with @click.native <toggle-button @click.native="yourFunction"/> and inside your function call preventDefault() like this yourFunction(event){
event.preventDefault();
//TODO
} |
Even simpler: <toggle-button @click.native.prevent="toggle" /> That also prevents an issue I was seeing where the toggle function was being called twice for a single click. |
Hi, how can I prevent change in toggle, example, I'm receiving data from database, and when I click in toggle-button I want to execute a method which changes value in database, but I can cancel that operation, problem is when I click on button it changes automatically even canceling operation, what I want is that the button wait if response is true or flase to change. Many thanks
The text was updated successfully, but these errors were encountered: