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) => {
|
||||
const { t } = useTranslation("clients");
|
||||
const { control } = useFormContext();
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
label={t("decisionStrategy")}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||
import {
|
||||
AlertVariant,
|
||||
Button,
|
||||
|
@ -33,10 +33,8 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
|
|||
const [resource, setResource] = useState<ResourceServerRepresentation>();
|
||||
const [importDialog, toggleImportDialog] = useToggle();
|
||||
|
||||
const { control, reset, handleSubmit } =
|
||||
useForm<ResourceServerRepresentation>({
|
||||
shouldUnregister: false,
|
||||
});
|
||||
const form = useForm<ResourceServerRepresentation>({});
|
||||
const { control, reset, handleSubmit } = form;
|
||||
|
||||
const adminClient = useAdminClient();
|
||||
const { addAlert, addError } = useAlerts();
|
||||
|
@ -134,7 +132,9 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
|
|||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormProvider {...form}>
|
||||
<DecisionStrategySelect isLimited />
|
||||
</FormProvider>
|
||||
<FormGroup
|
||||
hasNoPaddingTop
|
||||
label={t("allowRemoteResourceManagement")}
|
||||
|
|
Loading…
Reference in a new issue