mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Natural sorting for tags list in the UI
This commit is contained in:
parent
8d2c4e1246
commit
94e9c05d60
1 changed files with 3 additions and 1 deletions
|
|
@ -4,11 +4,13 @@ import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { fetchApplications, fetchIndexerProxies, fetchNotifications } from 'Store/Actions/settingsActions';
|
import { fetchApplications, fetchIndexerProxies, fetchNotifications } 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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue