I am currently making a Table component in React.js. My goal is to implement a search function similar to that one being used at https://www.datatables.net/.
Below is my code using filter and includes functions from Lodash library. This code does not work because it only looks for exact matches. For example if an object in my data array has fruit: "apple", the filter "app" has no matches.
data = filter(data, (row) => {
return includes(row, this.state.filter);
});
Is there any way I can implement fuzzy search with any of lodash's built in functions? If not can you suggest another way?