diff --git a/CHANGELOG.md b/CHANGELOG.md index e11b0c710..f12eb98f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 2.15.1 - 修复 `` type 不受控问题 [#1251](https://github.com/XiaoMi/hiui/issues/1251) +- 修复 `
` 使用 Upload 组件 onChange 方法 return false 无效 [#1259](https://github.com/XiaoMi/hiui/issues/1259) ## 2.15.0 diff --git a/components/form/Item.js b/components/form/Item.js index a6eaf2c70..5a85fbffd 100644 --- a/components/form/Item.js +++ b/components/form/Item.js @@ -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)