[Vuejs]-VueJS how to filter a mapgetter array

0👍

I ended with the following solution, dont know if is the right way to do it but make sense to me:

computed: {
    ...mapGetters({
      menuItems: 'menuTypes'
    }),
    filteredMenuItems: function() {
      return this.menuItems.filter(function(i) {
        return i.hidden == false;
      });
    }
  },

Leave a comment