From 105fe8239e2e6eeb8125ec755e3f34b1ebfc4f03 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sun, 17 Nov 2024 08:23:33 +0100 Subject: [PATCH] fix(frontend): contextVar edit dialog states --- frontend/src/components/context-vars/ContextVarDialog.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/context-vars/ContextVarDialog.tsx b/frontend/src/components/context-vars/ContextVarDialog.tsx index a1257ba..b7ba8db 100644 --- a/frontend/src/components/context-vars/ContextVarDialog.tsx +++ b/frontend/src/components/context-vars/ContextVarDialog.tsx @@ -66,7 +66,11 @@ export const ContextVarDialog: FC = ({ formState: { errors }, control, } = useForm({ - defaultValues: { name: data?.name || "", label: data?.label || "" }, + defaultValues: { + name: data?.name || "", + label: data?.label || "", + permanent: data?.permanent, + }, }); const validationRules = { label: { @@ -96,6 +100,7 @@ export const ContextVarDialog: FC = ({ reset({ label: data.label, name: data.name, + permanent: data.permanent, }); } else { reset();