1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-29 23:12:39 +01:00

Fixed: Natural sorting for tags list in the UI

Closes #7295
This commit is contained in:
Bogdan 2024-10-27 00:18:11 +03:00 committed by GitHub
parent 20ef22be94
commit 10b55bbee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,11 +4,13 @@ import { connect } from 'react-redux';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import { fetchDelayProfiles, fetchDownloadClients, fetchImportLists, fetchIndexers, fetchNotifications, fetchReleaseProfiles } from 'Store/Actions/settingsActions'; import { fetchDelayProfiles, fetchDownloadClients, fetchImportLists, fetchIndexers, fetchNotifications, fetchReleaseProfiles } from 'Store/Actions/settingsActions';
import { fetchTagDetails, fetchTags } from 'Store/Actions/tagActions'; import { fetchTagDetails, fetchTags } from 'Store/Actions/tagActions';
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
import sortByProp from 'Utilities/Array/sortByProp';
import Tags from './Tags'; import Tags from './Tags';
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createSelector(
(state) => state.tags, createSortedSectionSelector('tags', sortByProp('label')),
(tags) => { (tags) => {
const isFetching = tags.isFetching || tags.details.isFetching; const isFetching = tags.isFetching || tags.details.isFetching;
const error = tags.error || tags.details.error; const error = tags.error || tags.details.error;