Skip to content

Commit

Permalink
修正部分卸载情况下无法找到后续表单项方法
Browse files Browse the repository at this point in the history
  • Loading branch information
duxphp authored Dec 20, 2023
1 parent b2b254a commit 09e4305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/form/hooks/useInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function useInstance(props: TdFormProps, formRef, formMapRef: Rea
if (!name) return null;

const formItemRef = getMapValue(name, formMapRef);
return formItemRef?.current.getValue?.();
return formItemRef?.current?.getValue?.();
}

// 对外方法,获取一组字段名对应的值,当调用 getFieldsValue(true) 时返回所有值
Expand Down

0 comments on commit 09e4305

Please sign in to comment.