diff --git a/lib/reactTags.js b/lib/reactTags.js index 61a9e951c0..7eaebda413 100644 --- a/lib/reactTags.js +++ b/lib/reactTags.js @@ -77,7 +77,7 @@ var ReactTags = React.createClass({ var query = e.target.value.trim(); var suggestions = this.props.suggestions.filter(function(item) { - return (item.toLowerCase()).search(query.toLowerCase()) === 0; + return item.toLowerCase().startsWith(query.toLowerCase()); }); this.setState({