mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
fix onChange callback for widget parameters control
This commit is contained in:
parent
0226fca305
commit
8934a8e5a3
1 changed files with 10 additions and 1 deletions
|
@ -37,11 +37,20 @@ class EditWidgetParametersControl extends Component {
|
|||
this.setState({ widget: nextProps.widget });
|
||||
}
|
||||
|
||||
handleChange(value) {
|
||||
this.props.handleChange({
|
||||
target: {
|
||||
id: this.props.controlId,
|
||||
value: value
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<FormGroup controlId={this.props.controlId} validationState={this.props.validate ? this.props.validate(this.props.controlId) : null}>
|
||||
<ControlLabel>{this.props.label}</ControlLabel>
|
||||
<ParametersEditor content={this.state.widget[this.props.controlId] || {}} onChange={e => this.props.handleChange(e)} />
|
||||
<ParametersEditor content={this.state.widget[this.props.controlId] || {}} onChange={(v)=> this.handleChange(v)} />
|
||||
</FormGroup>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue