VueJS Computed Data Search Not Functioning
VueJS Computed Data Search Not Functioning I am attempting to create a search function in my Vue.js 2 application. However, even though my algorithm is giving me the right results, I am not getting the proper filter. Right now, whenever I run a search, I get nothing on the page. Here is my code: computed:{ filteredSmoothies: function(){ return this.smoothies.filter(smoothie => { var stuff = smoothie.title.split(" ").concat(smoothie.description.split(" ")).concat(smoothie.category) var sorted = ; for (var i = 0; i < stuff.length; i++) { sorted.push(stuff[i].toLowerCase()); } console.log(sorted) if(this.search != null){ var indivthings = this.search.split(" ") indivthings.forEach(item => { if(sorted.includes(item.toLowerCase())){console.log("true")} else {console.log("false")} if(sorted.includes(item.toLowerCase())){return true} }) } else { return true ...
