I am working on a filterable gallery, but now It is only showing the right image when the whole title matches the input value. But I want to filter on seperated letters. Here I wrote a function: `
filterList (filterText) {
var updatedList = this.props.array;
return updatedList.filter(function(item){
var split = item.name.split("");
console.log(split, filterText);
return split === filterText;
});
}
Now it show me the seperated item.name like this: ["p","h","o","t","o","","1"]
Instead of Photo 1 I want to filter on seperated letters.
Here is a link to the codePen: LINK `