pb123
pb123

Reputation: 91

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

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 ?

Upvotes: -1

Views: 101

Answers (1)

pb123
pb123

Reputation: 91

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

Upvotes: 0

Related Questions