mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Use natural sorting for remaining lists of items in the UI
This commit is contained in:
parent
76f30e7682
commit
8abccc709e
2 changed files with 6 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ import Scroller from 'Components/Scroller/Scroller';
|
|||
import Table from 'Components/Table/Table';
|
||||
import TableBody from 'Components/Table/TableBody';
|
||||
import { kinds, scrollDirections } from 'Helpers/Props';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import getErrorMessage from 'Utilities/Object/getErrorMessage';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import SelectIndexerRow from './SelectIndexerRow';
|
||||
|
|
@ -131,8 +132,8 @@ class AddIndexerModalContent extends Component {
|
|||
} = this.props;
|
||||
|
||||
const languages = Array.from(new Set(indexers.map(({ language }) => language)))
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.map((language) => ({ key: language, value: language }));
|
||||
.map((language) => ({ key: language, value: language }))
|
||||
.sort(sortByProp('value'));
|
||||
|
||||
const filteredIndexers = indexers.filter((indexer) => {
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -231,7 +231,9 @@ function SearchIndexOverview(props: SearchIndexOverviewProps) {
|
|||
|
||||
{indexerFlags.length
|
||||
? indexerFlags
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.sort((a, b) =>
|
||||
a.localeCompare(b, undefined, { numeric: true })
|
||||
)
|
||||
.map((flag, index) => {
|
||||
return (
|
||||
<Label key={index} kind={kinds.INFO}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue