Search anywhere within tag for tag selector filter

Follow-up to 62ea7e970a, and I think in line with the pre-React
behavior
This commit is contained in:
Dan Stillman 2019-03-27 07:49:59 -04:00
parent b248d28992
commit 69ff8ac1b6

View file

@ -171,7 +171,7 @@ Zotero.TagSelector = class TagSelectorContainer extends React.Component {
}
if (this.state.searchString) {
let lcStr = this.state.searchString.toLowerCase();
tags = tags.filter(tag => tag.toLowerCase().startsWith(lcStr));
tags = tags.filter(tag => tag.toLowerCase().includes(lcStr));
}
tags = tags.map((name) => {
return {