1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

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
@@ -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 });
}