diff --git a/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx b/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx index 614cff7fbc..024696629b 100644 --- a/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx +++ b/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx @@ -33,6 +33,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { const { t } = useTranslation(); const form = useForm({ mode: "onChange" }); const { control, handleSubmit, setValue, formState } = form; + const { isDirty, isValid } = formState; const { realm } = useRealm(); const providers = useLoginProviders(); @@ -60,12 +61,12 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { "attributes.dynamic.scope.regexp", ), append ? `${value}:*` : value, + { shouldDirty: true }, // Mark the field as dirty when we modify the field ); useEffect(() => { convertToFormValues(clientScope ?? {}, setValue); }, [clientScope]); - return ( { min={0} /> - {t("save")} + + {t("save")} +