From b54157a395a727a400af4016cca2529bb0fb6673 Mon Sep 17 00:00:00 2001 From: zombiej Date: Tue, 9 Apr 2019 22:52:25 +0800 Subject: [PATCH] update doc --- components/form/demo/customized-form-controls.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/form/demo/customized-form-controls.md b/components/form/demo/customized-form-controls.md index 7cbaecb390..483de33308 100644 --- a/components/form/demo/customized-form-controls.md +++ b/components/form/demo/customized-form-controls.md @@ -11,8 +11,8 @@ title: > * 提供受控属性 `value` 或其它与 [`valuePropName`](http://ant.design/components/form/#getFieldDecorator-参数) 的值同名的属性。 > * 提供 `onChange` 事件或 [`trigger`](http://ant.design/components/form/#getFieldDecorator-参数) 的值同名的事件。 > * 支持 ref: -> * React@16.8.0 之前只有 Class 组件支持。 -> * React@16.8.0 及之后可以通过 [useImperativeHandle](https://reactjs.org/docs/hooks-reference.html#useimperativehandle) 添加 ref 支持。([示例](https://codesandbox.io/s/31mv8004rp)) +> * React@16.3.0 之前只有 Class 组件支持。 +> * React@16.3.0 及之后可以通过 [forwardRef](https://reactjs.org/docs/forwarding-refs.html) 添加 ref 支持。([示例](https://codesandbox.io/s/7wj199900x)) ## en-US @@ -20,8 +20,8 @@ Customized or third-party form controls can be used in Form, too. Controls must > * It has a controlled property `value` or other name which is equal to the value of [`valuePropName`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters). > * It has event `onChange` or an event which name is equal to the value of [`trigger`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters). > * Support ref: -> * Can only use class component before React@16.8.0. -> * Can use [useImperativeHandle](https://reactjs.org/docs/hooks-reference.html#useimperativehandle) to add ref support after React@16.8.0. ([Sample](https://codesandbox.io/s/31mv8004rp)) +> * Can only use class component before React@16.3.0. +> * Can use [forwardRef](https://reactjs.org/docs/forwarding-refs.html) to add ref support after React@16.3.0. ([Sample](https://codesandbox.io/s/7wj199900x)) ````jsx import {