diff --git a/components/InstitutionContainer/InstitutionContainer.jsx b/components/InstitutionContainer/InstitutionContainer.jsx index 01158a8..9b23043 100644 --- a/components/InstitutionContainer/InstitutionContainer.jsx +++ b/components/InstitutionContainer/InstitutionContainer.jsx @@ -120,7 +120,10 @@ const AssetsList = ({ isInstitutionOpen, institutionName }) => { } = useFieldArray({ name: arrayName, }); - const { resetField } = useFormContext(); + const { + resetField, + handlers: { handleInstitutionDelete }, + } = useFormContext(); return ( handleInstitution.delete({ indexToDelete, - formValues: getValues(arrayName), + formValues: form.getValues(arrayName), setSelectedInstitutionIndex, setIsInstitutionOpen, - formSetValue: setValue, + formSetValue: form.setValue, }), }, };