diff --git a/src/components/form/form-subscribe.tsx b/src/components/form/form-subscribe.tsx index afa722ac2d..4198378df4 100644 --- a/src/components/form/form-subscribe.tsx +++ b/src/components/form/form-subscribe.tsx @@ -3,7 +3,7 @@ import type { FC, ReactNode } from 'react' import { FieldContext, useWatch } from 'rc-field-form' import type { FormInstance } from 'rc-field-form' import type { NamePath } from 'rc-field-form/es/interface' -import getValue from 'rc-util/lib/utils/get' +import pick from 'lodash/pick' type RenderChildren = ( changedValues: Record, @@ -19,7 +19,7 @@ export interface FormSubscribeProps { export const FormSubscribe: FC = props => { const form = useContext(FieldContext) - const value = useWatch(values => getValue(values, props.to), form) + const value = useWatch(values => pick(values, props.to), form) // Memo to avoid useless render const childNode = React.useMemo(