mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 15:29:40 +02:00
Fix priority input for provider manage edit modal
(cherry picked from commit 593652a84a45aea7b542e682c08453f4ee88871c)
This commit is contained in:
parent
1d4b6d4cad
commit
4fc1ee0aff
@ -10,7 +10,7 @@ function parseValue(props, value) {
|
|||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (value == null || value === '') {
|
if (value == null || value === '') {
|
||||||
return min;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newValue = isFloat ? parseFloat(value) : parseInt(value);
|
let newValue = isFloat ? parseFloat(value) : parseInt(value);
|
||||||
|
@ -41,7 +41,7 @@ function ManageDownloadClientsEditModalContent(
|
|||||||
const [removeCompletedDownloads, setRemoveCompletedDownloads] =
|
const [removeCompletedDownloads, setRemoveCompletedDownloads] =
|
||||||
useState(NO_CHANGE);
|
useState(NO_CHANGE);
|
||||||
const [removeFailedDownloads, setRemoveFailedDownloads] = useState(NO_CHANGE);
|
const [removeFailedDownloads, setRemoveFailedDownloads] = useState(NO_CHANGE);
|
||||||
const [priority, setPriority] = useState<string | number>(NO_CHANGE);
|
const [priority, setPriority] = useState<null | string | number>(null);
|
||||||
|
|
||||||
const save = useCallback(() => {
|
const save = useCallback(() => {
|
||||||
let hasChanges = false;
|
let hasChanges = false;
|
||||||
@ -62,7 +62,7 @@ function ManageDownloadClientsEditModalContent(
|
|||||||
payload.removeFailedDownloads = removeFailedDownloads === 'enabled';
|
payload.removeFailedDownloads = removeFailedDownloads === 'enabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priority !== NO_CHANGE) {
|
if (priority !== null) {
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
payload.priority = priority as number;
|
payload.priority = priority as number;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ function ManageIndexersEditModalContent(
|
|||||||
const [enableAutomaticSearch, setEnableAutomaticSearch] = useState(NO_CHANGE);
|
const [enableAutomaticSearch, setEnableAutomaticSearch] = useState(NO_CHANGE);
|
||||||
const [enableInteractiveSearch, setEnableInteractiveSearch] =
|
const [enableInteractiveSearch, setEnableInteractiveSearch] =
|
||||||
useState(NO_CHANGE);
|
useState(NO_CHANGE);
|
||||||
const [priority, setPriority] = useState<string | number>(NO_CHANGE);
|
const [priority, setPriority] = useState<null | string | number>(null);
|
||||||
|
|
||||||
const save = useCallback(() => {
|
const save = useCallback(() => {
|
||||||
let hasChanges = false;
|
let hasChanges = false;
|
||||||
@ -62,7 +62,7 @@ function ManageIndexersEditModalContent(
|
|||||||
payload.enableInteractiveSearch = enableInteractiveSearch === 'enabled';
|
payload.enableInteractiveSearch = enableInteractiveSearch === 'enabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priority !== NO_CHANGE) {
|
if (priority !== null) {
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
payload.priority = priority as number;
|
payload.priority = priority as number;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user