I use v-for to create inputs foreach item in a list, i assign a ref in the following way
:ref="`input-${index}`"
which makes my $refs look like this
Now my question is; on the addition of an input I also want to put focus on the last input, however I can't manage to make it work.
Right now I tried something like this,
this.$refs["input-" + index.toString()].focus()
however I feel like it has to do with the structure of refs I don't know how to deal with.
Does anybody know how I can access each input and how to focus it (i guess just .focus()).
So I do not know exactly anymore, however I remember that the problem was that I was putting focus on the ion-item rather than the ion-input. I needed to add .children[i] (i depending on what child it is). this allowed me to put focus in the input :)