Skip to content

Instantly share code, notes, and snippets.

@garmjs
Created November 18, 2015 19:54
Show Gist options
  • Save garmjs/d93cf216971797d1d01b to your computer and use it in GitHub Desktop.
Save garmjs/d93cf216971797d1d01b to your computer and use it in GitHub Desktop.
React Filter
var updatedList = this.state.list.filter(function(item){
return item.toLowerCase().search(
evt.target.value.toLowerCase()) !== -1;
});
this.setState({ list: updatedList });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment