mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +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 { useSelector } from 'react-redux';
|
||||||
import Series from 'Series/Series';
|
import Series from 'Series/Series';
|
||||||
import createAllSeriesSelector from 'Store/Selectors/createAllSeriesSelector';
|
import createAllSeriesSelector from 'Store/Selectors/createAllSeriesSelector';
|
||||||
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||||
import FilterBuilderRowValueProps from './FilterBuilderRowValueProps';
|
import FilterBuilderRowValueProps from './FilterBuilderRowValueProps';
|
||||||
|
|
||||||
function SeriesFilterBuilderRowValue(props: FilterBuilderRowValueProps) {
|
function SeriesFilterBuilderRowValue(props: FilterBuilderRowValueProps) {
|
||||||
const allSeries: Series[] = useSelector(createAllSeriesSelector());
|
const allSeries: Series[] = useSelector(createAllSeriesSelector());
|
||||||
|
|
||||||
const tagList = allSeries.map((series) => {
|
const tagList = allSeries
|
||||||
return {
|
.map((series) => ({ id: series.id, name: series.title }))
|
||||||
id: series.id,
|
.sort(sortByName);
|
||||||
name: series.title,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
return <FilterBuilderRowValue {...props} tagList={tagList} />;
|
return <FilterBuilderRowValue {...props} tagList={tagList} />;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user