Changed to be disabled when not enabled (#2323)

This commit is contained in:
Erik Jan de Wit 2022-03-29 12:39:46 +02:00 committed by GitHub
parent 6aab45dca7
commit d2bac33d37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,12 +154,8 @@ export const RequiredActions = () => {
<Switch
id={`default-${row.name}`}
label={t("common:on")}
isDisabled={!!isUnregisteredAction(row.data)}
labelOff={
isUnregisteredAction(row.data)
? t("disabledOff")
: t("common:off")
}
isDisabled={!row.enabled}
labelOff={!row.enabled ? t("disabledOff") : t("common:off")}
isChecked={row.defaultAction}
onChange={() => {
updateAction(row.data, "defaultAction");