mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-07 21:42:16 -07:00
Fixed: Editing provider/profile settings appearing to affect wrong item
This commit is contained in:
parent
843bc6aabc
commit
b592b11b97
16 changed files with 53 additions and 53 deletions
|
@ -4,12 +4,13 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||
import { metadataProfileNames } from 'Helpers/Props';
|
||||
import SelectInput from './SelectInput';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.settings.metadataProfiles,
|
||||
createSortedSectionSelector('settings.metadataProfiles', sortByName),
|
||||
(state, { includeNoChange }) => includeNoChange,
|
||||
(state, { includeMixed }) => includeMixed,
|
||||
(state, { includeNone }) => includeNone,
|
||||
|
@ -18,7 +19,7 @@ function createMapStateToProps() {
|
|||
const profiles = metadataProfiles.items.filter((item) => item.name !== metadataProfileNames.NONE);
|
||||
const noneProfile = metadataProfiles.items.find((item) => item.name === metadataProfileNames.NONE);
|
||||
|
||||
const values = _.map(profiles.sort(sortByName), (metadataProfile) => {
|
||||
const values = _.map(profiles, (metadataProfile) => {
|
||||
return {
|
||||
key: metadataProfile.id,
|
||||
value: metadataProfile.name
|
||||
|
|
|
@ -4,15 +4,16 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||
import SelectInput from './SelectInput';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.settings.qualityProfiles,
|
||||
createSortedSectionSelector('settings.qualityProfiles', sortByName),
|
||||
(state, { includeNoChange }) => includeNoChange,
|
||||
(state, { includeMixed }) => includeMixed,
|
||||
(qualityProfiles, includeNoChange, includeMixed) => {
|
||||
const values = _.map(qualityProfiles.items.sort(sortByName), (qualityProfile) => {
|
||||
const values = _.map(qualityProfiles.items, (qualityProfile) => {
|
||||
return {
|
||||
key: qualityProfile.id,
|
||||
value: qualityProfile.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue