mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 05:44:50 +00:00
Sort movies by name in filter builder
This commit is contained in:
parent
f2357e0b60
commit
9a50fcb82a
1 changed files with 4 additions and 6 deletions
|
@ -2,18 +2,16 @@ import React from 'react';
|
|||
import { useSelector } from 'react-redux';
|
||||
import Movie from 'Movie/Movie';
|
||||
import createAllMoviesSelector from 'Store/Selectors/createAllMoviesSelector';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||
import FilterBuilderRowValueProps from './FilterBuilderRowValueProps';
|
||||
|
||||
function MovieFilterBuilderRowValue(props: FilterBuilderRowValueProps) {
|
||||
const allMovies: Movie[] = useSelector(createAllMoviesSelector());
|
||||
|
||||
const tagList = allMovies.map((movie) => {
|
||||
return {
|
||||
id: movie.id,
|
||||
name: movie.title,
|
||||
};
|
||||
});
|
||||
const tagList = allMovies
|
||||
.map((movie) => ({ id: movie.id, name: movie.title }))
|
||||
.sort(sortByName);
|
||||
|
||||
return <FilterBuilderRowValue {...props} tagList={tagList} />;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue