[Vuejs]-Vue โ€“ Clear true false toggles from out side a loop

0๐Ÿ‘

I got a fix for this

clearAll: function() {
  for (var i = 0; i < this.shopFilters.length; i++) {
    var filter = this.shopFilters[i];
    filter.buttonActive = false;
    filter.filterVisible = false;
    for (var j = 0; j < filter.values.length; j++) {
      var option = filter.values[j];
      option.selected = false;
    }
  }
}, // end clearAll

Leave a comment