[Vuejs]-Vue / axios filter types of same type as single item

0๐Ÿ‘

I think this is a use case of computed properties [https://v2.vuejs.org/v2/guide/computed.html]

May be something like this:

computed: {
  filterItems: function() {
    return this.allitems.filter(item => item.type != singleitem.type);
  }
}

So whenever the data changed. filterItems get (re)computed.

Leave a comment