mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
docs: fix useWatch type error (#37013)
This commit is contained in:
parent
b63e49e9e8
commit
9c01aff437
@ -315,7 +315,7 @@ export default () => {
|
||||
|
||||
### Form.useWatch
|
||||
|
||||
`type Form.useWatch = (namePath: NamePath, formInstance: FormInstance): Value`
|
||||
`type Form.useWatch = (namePath: NamePath, formInstance?: FormInstance): Value`
|
||||
|
||||
Added in `4.20.0`. Watch the value of a field. You can use this to interactive with other hooks like `useSWR` to reduce develop cost:
|
||||
|
||||
|
@ -314,7 +314,7 @@ export default () => {
|
||||
|
||||
### Form.useWatch
|
||||
|
||||
`type Form.useWatch = (namePath: NamePath, formInstance: FormInstance): Value`
|
||||
`type Form.useWatch = (namePath: NamePath, formInstance?: FormInstance): Value`
|
||||
|
||||
`4.20.0` 新增,用于直接获取 form 中字段对应的值。通过该 Hooks 可以与诸如 `useSWR` 进行联动从而降低维护成本:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user