diff options
author | LASER-Yi <[email protected]> | 2021-04-20 01:42:24 +0800 |
---|---|---|
committer | LASER-Yi <[email protected]> | 2021-04-20 01:42:24 +0800 |
commit | 65e68d44098a01b13277fdc6a20651c51403014a (patch) | |
tree | 4ff5481fda1271fa5ce87673115d1d0662708b75 | |
parent | e462686c178bb2c611b873b65b896ec99b6d414a (diff) | |
download | bazarr-65e68d44098a01b13277fdc6a20651c51403014a.tar.gz bazarr-65e68d44098a01b13277fdc6a20651c51403014a.zip |
Fix issues in language profile modal
-rw-r--r-- | frontend/src/Settings/Languages/components.tsx | 2 | ||||
-rw-r--r-- | frontend/src/Settings/Languages/modal.tsx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/frontend/src/Settings/Languages/components.tsx b/frontend/src/Settings/Languages/components.tsx index ac545e449..37924da28 100644 --- a/frontend/src/Settings/Languages/components.tsx +++ b/frontend/src/Settings/Languages/components.tsx @@ -16,7 +16,7 @@ export const LanguageSelector: FunctionComponent< return ( <CLanguageSelector multiple - defaultValue={enabled} + value={enabled} options={options} onChange={(val) => { update(val, settingKey); diff --git a/frontend/src/Settings/Languages/modal.tsx b/frontend/src/Settings/Languages/modal.tsx index b93df9b62..6905157e6 100644 --- a/frontend/src/Settings/Languages/modal.tsx +++ b/frontend/src/Settings/Languages/modal.tsx @@ -19,6 +19,7 @@ import { useCloseModal, usePayload, } from "../../components"; +import { BuildKey } from "../../utilites"; import { Input, Message } from "../components"; import { cutoffOptions } from "./options"; interface Props { @@ -170,7 +171,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = ( return ( <Form.Check custom - id={`${item.language}-forced`} + id={BuildKey(item.id, item.language, "forced")} checked={value === "True"} onChange={(v) => { item.forced = v.target.checked ? "True" : "False"; @@ -188,7 +189,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = ( return ( <Form.Check custom - id={`${item.language}-hi`} + id={BuildKey(item.id, item.language, "hi")} checked={value === "True"} onChange={(v) => { item.hi = v.target.checked ? "True" : "False"; @@ -206,7 +207,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = ( return ( <Form.Check custom - id={`${item.language}-audio`} + id={BuildKey(item.id, item.language, "audio")} checked={value === "True"} onChange={(v) => { item.audio_exclude = v.target.checked ? "True" : "False"; |