Merge remote-tracking branch 'baidu/master'

This commit is contained in:
2betop 2020-06-03 13:18:01 +08:00
commit 6c3e358c9b
2 changed files with 5 additions and 2 deletions

View File

@ -522,6 +522,7 @@ export default class FormControl extends React.PureComponent<
store, store,
data, data,
disabled, disabled,
onChange: superOnChange,
...rest ...rest
} = this.props; } = this.props;
@ -539,7 +540,8 @@ export default class FormControl extends React.PureComponent<
data: store ? store.data : data, data: store ? store.data : data,
value, value,
formItemValue: value, // 为了兼容老版本的自定义组件 formItemValue: value, // 为了兼容老版本的自定义组件
onChange: this.handleChange, onChange:
control.type === 'input-group' ? superOnChange : this.handleChange,
onBlur: this.handleBlur, onBlur: this.handleBlur,
setValue: this.setValue, setValue: this.setValue,
getValue: this.getValue, getValue: this.getValue,

View File

@ -50,7 +50,7 @@ export class InputGroup extends React.Component<
} }
renderControl(control: any, index: any, otherProps?: any) { renderControl(control: any, index: any, otherProps?: any) {
const {render} = this.props; const {render, onChange} = this.props;
if (!control) { if (!control) {
return null; return null;
@ -71,6 +71,7 @@ export class InputGroup extends React.Component<
} }
return render(`${index}`, subSchema, { return render(`${index}`, subSchema, {
onChange,
...otherProps ...otherProps
}); });
} }