mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Use natural sorting for lists of items in the UI
(cherry picked from commit 1a1c8e6c08a6db5fcd2b5d17e65fa1f943d2e746) Closes #4912 Closes #4921
This commit is contained in:
parent
a9dd947eed
commit
7f73a2e23a
29 changed files with 94 additions and 63 deletions
|
@ -3,6 +3,7 @@ import { useSelector } from 'react-redux';
|
|||
import { CommandBody } from 'Commands/Command';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import createMultiArtistsSelector from 'Store/Selectors/createMultiArtistsSelector';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './QueuedTaskRowNameCell.css';
|
||||
|
||||
|
@ -39,9 +40,7 @@ export default function QueuedTaskRowNameCell(
|
|||
}
|
||||
|
||||
const artists = useSelector(createMultiArtistsSelector(movieIds));
|
||||
const sortedArtists = artists.sort((a, b) =>
|
||||
a.sortName.localeCompare(b.sortName)
|
||||
);
|
||||
const sortedArtists = artists.sort(sortByProp('sortName'));
|
||||
|
||||
return (
|
||||
<TableRowCell>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue