Browse Source

update changelog for getFieldDecorator

pull/3232/head
afc163 8 years ago
parent
commit
ce894a60ae
  1. 12
      CHANGELOG.en-US.md
  2. 12
      CHANGELOG.zh-CN.md

12
CHANGELOG.en-US.md

@ -61,14 +61,16 @@ There are some breaking changes in `antd@2.0.0`, and you need to modify your cod
The following change will throw some warnings in the console and it will still work, but we recommend to update your code.
* `getFieldProps` of Form is deprecated, please use `getFieldDecorator`:
```diff
+ getFieldDecorator('userName', { ... })(
<Input placeholder="请输入账户名"
- {...getFieldProps('userName', { ... })}
/>
+ )
- <Input placeholder="text" {...getFieldProps('userName', { ... })} />
+ {getFieldDecorator('userName', { ... })(
+ <Input placeholder="text" />
+ )}
```
* `toggleOpen` of DatePicker is deprecated, please use `onOpenChange`:
```diff
- handleToggleOpen({ open }) {
+ handleOpenChange(open) {

12
CHANGELOG.zh-CN.md

@ -59,14 +59,16 @@ timeline: true
以下变化升级后旧代码仍然能正常运行,但是控制台会出现警告提示,建议按提示进行修改。
* Form 废弃 `getFieldProps`,请使用 `getFieldDecorator`
```diff
+ getFieldDecorator('userName', { ... })(
<Input placeholder="请输入账户名"
- {...getFieldProps('userName', { ... })}
/>
+ )
- <Input placeholder="text" {...getFieldProps('userName', { ... })} />
+ {getFieldDecorator('userName', { ... })(
+ <Input placeholder="text" />
+ )}
```
* DatePicker 废弃 `toggleOpen`,请使用 `onOpenChange`
```diff
- handleToggleOpen({ open }) {
+ handleOpenChange(open) {

Loading…
Cancel
Save