mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
form中input-group数据同步问题
This commit is contained in:
parent
faf79f1073
commit
8fc4f69dff
@ -522,6 +522,7 @@ export default class FormControl extends React.PureComponent<
|
||||
store,
|
||||
data,
|
||||
disabled,
|
||||
onChange: superOnChange,
|
||||
...rest
|
||||
} = this.props;
|
||||
|
||||
@ -539,7 +540,8 @@ export default class FormControl extends React.PureComponent<
|
||||
data: store ? store.data : data,
|
||||
value,
|
||||
formItemValue: value, // 为了兼容老版本的自定义组件
|
||||
onChange: this.handleChange,
|
||||
onChange:
|
||||
control.type === 'input-group' ? superOnChange : this.handleChange,
|
||||
onBlur: this.handleBlur,
|
||||
setValue: this.setValue,
|
||||
getValue: this.getValue,
|
||||
|
@ -50,7 +50,7 @@ export class InputGroup extends React.Component<
|
||||
}
|
||||
|
||||
renderControl(control: any, index: any, otherProps?: any) {
|
||||
const {render} = this.props;
|
||||
const {render, onChange} = this.props;
|
||||
|
||||
if (!control) {
|
||||
return null;
|
||||
@ -71,6 +71,7 @@ export class InputGroup extends React.Component<
|
||||
}
|
||||
|
||||
return render(`${index}`, subSchema, {
|
||||
onChange,
|
||||
...otherProps
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user