diff --git a/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx b/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx index e6b0977f3f..d7512ed52a 100644 --- a/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx +++ b/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx @@ -1,11 +1,3 @@ -import { useEffect, useState } from "react"; -import { - Controller, - FormProvider, - useForm, - useFormContext, -} from "react-hook-form"; -import { useTranslation } from "react-i18next"; import { ActionGroup, AlertVariant, @@ -22,18 +14,26 @@ import { TextContent, } from "@patternfly/react-core"; import { QuestionCircleIcon } from "@patternfly/react-icons"; +import { useEffect, useState } from "react"; +import { + Controller, + FormProvider, + useForm, + useFormContext, +} from "react-hook-form-v7"; +import { useTranslation } from "react-i18next"; import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation"; -import { convertFormValuesToObject, convertToFormValues } from "../../util"; +import { useAlerts } from "../../components/alert/Alerts"; +import { FormAccess } from "../../components/form-access/FormAccess"; +import { useHelp } from "../../components/help-enabler/HelpHeader"; +import { HelpItem } from "../../components/help-enabler/HelpItem"; +import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput"; +import { MultiLineInput } from "../../components/multi-line-input/hook-form-v7/MultiLineInput"; +import { TimeSelector } from "../../components/time-selector/TimeSelector"; import { useAdminClient } from "../../context/auth/AdminClient"; import { useRealm } from "../../context/realm-context/RealmContext"; -import { FormAccess } from "../../components/form-access/FormAccess"; -import { HelpItem } from "../../components/help-enabler/HelpItem"; -import { useHelp } from "../../components/help-enabler/HelpHeader"; -import { useAlerts } from "../../components/alert/Alerts"; -import { TimeSelector } from "../../components/time-selector/TimeSelector"; -import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput"; -import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput"; +import { convertFormValuesToObject, convertToFormValues } from "../../util"; import "./webauthn-policy.css"; @@ -102,24 +102,26 @@ const WebauthnSelect = ({ name={name} defaultValue={options[0]} control={control} - render={({ onChange, value }) => ( + render={({ field }) => (