mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
New: Use natural sorting for lists of items in the UI
(cherry picked from commit 1a1c8e6c08a6db5fcd2b5d17e65fa1f943d2e746) Closes #10177
This commit is contained in:
@@ -4,7 +4,7 @@ import { createAction } from 'redux-actions';
|
||||
import { batchActions } from 'redux-batched-actions';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, filterTypes, sortDirections } from 'Helpers/Props';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||
import getNewMovie from 'Utilities/Movie/getNewMovie';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
@@ -346,7 +346,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return tagList.sort(sortByName);
|
||||
return tagList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -365,7 +365,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return collectionList.sort(sortByName);
|
||||
return collectionList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -384,7 +384,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return collectionList.sort(sortByName);
|
||||
return collectionList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -426,7 +426,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return tagList.sort(sortByName);
|
||||
return tagList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createAction } from 'redux-actions';
|
||||
import { batchActions } from 'redux-batched-actions';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, filterTypePredicates, filterTypes, sortDirections } from 'Helpers/Props';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||
import getNewMovie from 'Utilities/Movie/getNewMovie';
|
||||
import translate from 'Utilities/String/translate';
|
||||
@@ -155,7 +155,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return genreList.sort(sortByName);
|
||||
return genreList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, sortDirections } from 'Helpers/Props';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import createHandleActions from './Creators/createHandleActions';
|
||||
import createSetClientSideCollectionFilterReducer from './Creators/Reducers/createSetClientSideCollectionFilterReducer';
|
||||
@@ -327,7 +327,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return collectionList.sort(sortByName);
|
||||
return collectionList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -349,7 +349,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return groupList.sort(sortByName);
|
||||
return groupList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -374,7 +374,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return tagList.sort(sortByName);
|
||||
return tagList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -393,7 +393,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return collectionList.sort(sortByName);
|
||||
return collectionList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -463,7 +463,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return genreList.sort(sortByName);
|
||||
return genreList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -512,7 +512,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return certificationList.sort(sortByName);
|
||||
return certificationList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, filterTypePredicates, filterTypes, sortDirections } from 'Helpers/Props';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import sortByProp from 'Utilities/Array/sortByProp';
|
||||
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import createFetchHandler from './Creators/createFetchHandler';
|
||||
@@ -198,7 +198,7 @@ export const defaultState = {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return genreList.sort(sortByName);
|
||||
return genreList.sort(sortByProp('name'));
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user