I have the below getter:
withEarmarks: state => {
var count = 0;
for (let l of state.laptops) {
if (l.earmarks.length > 0) {
count++;
}
}
return count;
}
And in a component, this computed property derived from that getter:
withEarmarks() { return this.$store.getters.withEarmarks; },
The value returned is correct, until I change an element within the laptops array, and then the getter doesn't update.