1👍
✅
I don’t see a comparison of the selected number and the number in each objects you’re looping over. You need something like this:
if (selectedNumber === obj[i].number) {
this.$store.commit("updateNumber", selectedNumber);
break;
}
Where selectedNumber
is the number being passed to the method.
@click="onSelect(call.number)"
…
methods: {
onSelect(selectedNumber) { ...
👤wdm
Source:stackexchange.com