Fixed: Disabled select option still selectable

This commit is contained in:
Mark McDowall 2024-03-13 21:05:15 -07:00 committed by Mark McDowall
parent 6d552f2a60
commit 063dba22a8
8 changed files with 18 additions and 18 deletions

View File

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import monitorOptions from 'Utilities/Series/monitorOptions'; import monitorOptions from 'Utilities/Series/monitorOptions';
import translate from 'Utilities/String/translate'; import translate from 'Utilities/String/translate';
import SelectInput from './SelectInput'; import EnhancedSelectInput from './EnhancedSelectInput';
function MonitorEpisodesSelectInput(props) { function MonitorEpisodesSelectInput(props) {
const { const {
@ -19,7 +19,7 @@ function MonitorEpisodesSelectInput(props) {
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true isDisabled: true
}); });
} }
@ -29,12 +29,12 @@ function MonitorEpisodesSelectInput(props) {
get value() { get value() {
return `(${translate('Mixed')})`; return `(${translate('Mixed')})`;
}, },
disabled: true isDisabled: true
}); });
} }
return ( return (
<SelectInput <EnhancedSelectInput
values={values} values={values}
{...otherProps} {...otherProps}
/> />

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import monitorNewItemsOptions from 'Utilities/Series/monitorNewItemsOptions'; import monitorNewItemsOptions from 'Utilities/Series/monitorNewItemsOptions';
import SelectInput from './SelectInput'; import EnhancedSelectInput from './EnhancedSelectInput';
function MonitorNewItemsSelectInput(props) { function MonitorNewItemsSelectInput(props) {
const { const {
@ -16,7 +16,7 @@ function MonitorNewItemsSelectInput(props) {
values.unshift({ values.unshift({
key: 'noChange', key: 'noChange',
value: 'No Change', value: 'No Change',
disabled: true isDisabled: true
}); });
} }
@ -24,12 +24,12 @@ function MonitorNewItemsSelectInput(props) {
values.unshift({ values.unshift({
key: 'mixed', key: 'mixed',
value: '(Mixed)', value: '(Mixed)',
disabled: true isDisabled: true
}); });
} }
return ( return (
<SelectInput <EnhancedSelectInput
values={values} values={values}
{...otherProps} {...otherProps}
/> />

View File

@ -28,7 +28,7 @@ function createMapStateToProps() {
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: includeNoChangeDisabled isDisabled: includeNoChangeDisabled
}); });
} }
@ -38,7 +38,7 @@ function createMapStateToProps() {
get value() { get value() {
return `(${translate('Mixed')})`; return `(${translate('Mixed')})`;
}, },
disabled: true isDisabled: true
}); });
} }

View File

@ -15,7 +15,7 @@ interface ISeriesTypeOption {
key: string; key: string;
value: string; value: string;
format?: string; format?: string;
disabled?: boolean; isDisabled?: boolean;
} }
const seriesTypeOptions: ISeriesTypeOption[] = [ const seriesTypeOptions: ISeriesTypeOption[] = [
@ -55,7 +55,7 @@ function SeriesTypeSelectInput(props: SeriesTypeSelectInputProps) {
values.unshift({ values.unshift({
key: 'noChange', key: 'noChange',
value: translate('NoChange'), value: translate('NoChange'),
disabled: includeNoChangeDisabled, isDisabled: includeNoChangeDisabled,
}); });
} }
@ -63,7 +63,7 @@ function SeriesTypeSelectInput(props: SeriesTypeSelectInputProps) {
values.unshift({ values.unshift({
key: 'mixed', key: 'mixed',
value: `(${translate('Mixed')})`, value: `(${translate('Mixed')})`,
disabled: true, isDisabled: true,
}); });
} }

View File

@ -36,7 +36,7 @@ const monitoredOptions = [
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true, isDisabled: true,
}, },
{ {
key: 'monitored', key: 'monitored',
@ -58,7 +58,7 @@ const seasonFolderOptions = [
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true, isDisabled: true,
}, },
{ {
key: 'yes', key: 'yes',

View File

@ -32,7 +32,7 @@ const enableOptions = [
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true, isDisabled: true,
}, },
{ {
key: 'enabled', key: 'enabled',

View File

@ -31,7 +31,7 @@ const autoAddOptions = [
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true, isDisabled: true,
}, },
{ {
key: 'enabled', key: 'enabled',

View File

@ -32,7 +32,7 @@ const enableOptions = [
get value() { get value() {
return translate('NoChange'); return translate('NoChange');
}, },
disabled: true, isDisabled: true,
}, },
{ {
key: 'enabled', key: 'enabled',