Fixed decision strategy not selecting properly (#2569)
This commit is contained in:
parent
c2df6e7dfb
commit
24f43d59ec
2 changed files with 7 additions and 6 deletions
|
@ -18,6 +18,7 @@ export const DecisionStrategySelect = ({
|
||||||
}: DecisionStrategySelectProps) => {
|
}: DecisionStrategySelectProps) => {
|
||||||
const { t } = useTranslation("clients");
|
const { t } = useTranslation("clients");
|
||||||
const { control } = useFormContext();
|
const { control } = useFormContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={t("decisionStrategy")}
|
label={t("decisionStrategy")}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
AlertVariant,
|
AlertVariant,
|
||||||
Button,
|
Button,
|
||||||
|
@ -33,10 +33,8 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
|
||||||
const [resource, setResource] = useState<ResourceServerRepresentation>();
|
const [resource, setResource] = useState<ResourceServerRepresentation>();
|
||||||
const [importDialog, toggleImportDialog] = useToggle();
|
const [importDialog, toggleImportDialog] = useToggle();
|
||||||
|
|
||||||
const { control, reset, handleSubmit } =
|
const form = useForm<ResourceServerRepresentation>({});
|
||||||
useForm<ResourceServerRepresentation>({
|
const { control, reset, handleSubmit } = form;
|
||||||
shouldUnregister: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const adminClient = useAdminClient();
|
const adminClient = useAdminClient();
|
||||||
const { addAlert, addError } = useAlerts();
|
const { addAlert, addError } = useAlerts();
|
||||||
|
@ -134,7 +132,9 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
<FormProvider {...form}>
|
||||||
<DecisionStrategySelect isLimited />
|
<DecisionStrategySelect isLimited />
|
||||||
|
</FormProvider>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
hasNoPaddingTop
|
hasNoPaddingTop
|
||||||
label={t("allowRemoteResourceManagement")}
|
label={t("allowRemoteResourceManagement")}
|
||||||
|
|
Loading…
Reference in a new issue