Closed daniel-stelle closed 5 years ago
Hi daniel
thanks for your suggestion
but why don't you use @change
or v-on:change
instead?
anyway i intended to make the components just like html default inputs and if that @click
is supported in them i will add that feature as soon as possible
Hi
i found this conversation which is related to our case here
https://github.com/vuejs/vue/issues/3253
as @AnsonHwang86 suggests there, you can use .native
modifier if you need listen to click
event and @change
isn't suitable for your specific use case
Cheers Hamed! I use the checkbox to make an ajax
request. @click.native
is exactly what I used to disable the event.target
for the time of the request being processed and re-enable it later having the result of the request.
It's nice because the checkbox now represents the exact state of the model.attribute in the database :)
Right now, putting a
@click
orv-on:click
doesn't run the function that it is passed. I'm not sure if this was intended or not, but there are many circumstances where an on click handler is useful/needed.