mirror of
https://github.com/hexastack/hexabot
synced 2024-11-25 13:27:58 +00:00
fix(frontend): contextVar edit dialog states
This commit is contained in:
parent
e642ea093e
commit
105fe8239e
@ -66,7 +66,11 @@ export const ContextVarDialog: FC<ContextVarDialogProps> = ({
|
||||
formState: { errors },
|
||||
control,
|
||||
} = useForm<IContextVarAttributes>({
|
||||
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<ContextVarDialogProps> = ({
|
||||
reset({
|
||||
label: data.label,
|
||||
name: data.name,
|
||||
permanent: data.permanent,
|
||||
});
|
||||
} else {
|
||||
reset();
|
||||
|
Loading…
Reference in New Issue
Block a user