I want to use the index of a v-for loop as the argument for a click handler, but this returns undefined?
<div v-for="(item, key, index) in groups" v-on:click="selected(index)">{{item.name}}</div>
Handler
selected(i) {
console.log("you clicked " + i) // this logs "you clicked undefined"
}