Skip to content

Commit

Permalink
Merge pull request #1260 from XiaoMi/hotfix/#1259
Browse files Browse the repository at this point in the history
fix: #1259
  • Loading branch information
solarjoker authored Nov 2, 2020
2 parents 593e02b + ed8a368 commit d59f010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 2.15.1

- 修复 `<Input />` type 不受控问题 [#1251](https://github.com/XiaoMi/hiui/issues/1251)
- 修复 `<Form />` 使用 Upload 组件 onChange 方法 return false 无效 [#1259](https://github.com/XiaoMi/hiui/issues/1259)

## 2.15.0

Expand Down
3 changes: 2 additions & 1 deletion components/form/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ class FormItem extends Component {
? children
: React.cloneElement(children, {
onChange: (...args) => {
children.props.onChange && children.props.onChange(...args)
const changeVal = children.props.onChange && children.props.onChange(...args)
setTimeout(() => {
this.handleFieldChange()
})
return changeVal
},
onBlur: (...args) => {
children.props.onBlur && children.props.onBlur(...args)
Expand Down

0 comments on commit d59f010

Please sign in to comment.