Skip to content

Instantly share code, notes, and snippets.

@A
Last active August 29, 2015 14:22
Show Gist options
  • Save A/48abf0ff86bb358df74c to your computer and use it in GitHub Desktop.
Save A/48abf0ff86bb358df74c to your computer and use it in GitHub Desktop.
return !filterValue || this.props.matchPos === 'start'
? this.props.matchProp !== 'label'
&& valueTest.toLowerCase().substr(0, filterValue.length) === filterValue || this.props.matchProp !== 'value'
&& labelTest.toLowerCase().substr(0, filterValue.length) === filterValue
: this.props.matchProp !== 'label' && valueTest.toLowerCase().indexOf(filterValue.toLowerCase()) >= 0
|| this.props.matchProp !== 'value' && labelTest.toLowerCase().indexOf(filterValue.toLowerCase()) >= 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment