snakom23
snakom23

Reputation: 203

Get name from textChange event in nativescript-vue

have this code:

              <TextField
                v-model="lastname"
                @textChange="ontextChange"
                name="lastname"
              />

and i want get name from event:

ontextChange(args){
 console.log(args.name)
}

but i thing it's wrong.

Upvotes: 1

Views: 640

Answers (1)

Manoj
Manoj

Reputation: 21908

You are accessing the wrong attribute in the arguments. It's of type EventData, you must be looking for args.eventName.

Update:

If you want to access the actual TextField which triggered the event, args.object should work.

Upvotes: 1

Related Questions