How do you programmatically trigger a tap event on a button?

52 views Asked by At

Ive tried all sorts but cant seem to get it work and there seems to be very little on the subject..

i currently have this <Button text="Retrieve" @tap="handleRetrieve" ref="btnRetrieve" class="my-button" row="1" col="0" />

and in a textchange function event, i have this bit of code. its my attempt to trigger the tap event on the above button, but it doesnt work..

this.$refs.btnRetrieve.$emit('tap')

i get the message "$emit is not a function". Is there anything else i should try ?

1

There are 1 answers

0
pb123 On

I've had a resolution to this and its quite obvious. I just ran handleRetrieve function in my textChange event function.