mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-29 23:12:39 +01:00
Sort series by name in filter builder
This commit is contained in:
parent
e9bb1d52a7
commit
6027041a4f
@ -2,18 +2,16 @@ import React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import Series from 'Series/Series';
|
||||
import createAllSeriesSelector from 'Store/Selectors/createAllSeriesSelector';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||
import FilterBuilderRowValueProps from './FilterBuilderRowValueProps';
|
||||
|
||||
function SeriesFilterBuilderRowValue(props: FilterBuilderRowValueProps) {
|
||||
const allSeries: Series[] = useSelector(createAllSeriesSelector());
|
||||
|
||||
const tagList = allSeries.map((series) => {
|
||||
return {
|
||||
id: series.id,
|
||||
name: series.title,
|
||||
};
|
||||
});
|
||||
const tagList = allSeries
|
||||
.map((series) => ({ id: series.id, name: series.title }))
|
||||
.sort(sortByName);
|
||||
|
||||
return <FilterBuilderRowValue {...props} tagList={tagList} />;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user