Fixed: Sorting of search results in series search box

Closes #3013
This commit is contained in:
Mark McDowall 2019-03-25 23:26:55 -07:00
parent c3a6e01040
commit b6257400ec
1 changed files with 1 additions and 10 deletions

View File

@ -155,16 +155,7 @@ class SeriesSearchInput extends Component {
onSuggestionsFetchRequested = ({ value }) => {
const fuse = new Fuse(this.props.series, fuseOptions);
const suggestions = fuse.search(value).sort((a, b) => {
if (a.item.sortTitle < b.item.sortTitle) {
return -1;
}
if (a.item.sortTitle > b.item.sortTitle) {
return 1;
}
return 0;
});
const suggestions = fuse.search(value);
this.setState({ suggestions });
}