1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Fix plot-table widget edit dialog

This commit is contained in:
Markus Grigull 2017-08-01 21:20:29 +02:00
parent 00fb4c471b
commit b7d80c5fc5
2 changed files with 4 additions and 3 deletions

View file

@ -38,7 +38,7 @@ class EditWidgetTextControl extends Component {
render() {
return (
<FormGroup controlId={this.props.controlId} validationState={this.props.validate(this.props.controlId)}>
<FormGroup controlId={this.props.controlId} validationState={this.props.validate ? this.props.validate(this.props.controlId) : null}>
<ControlLabel>{this.props.label}</ControlLabel>
<FormControl type="text" placeholder={this.props.placeholder} value={this.state.widget[this.props.controlId] || ''} onChange={e => this.props.handleChange(e)} />
<FormControl.Feedback />

View file

@ -27,7 +27,7 @@ import Dialog from './dialog';
import createControls from './edit-widget-control-creator';
class EditWidgetDialog extends React.Component {
valid: true;
valid = true;
constructor(props) {
super(props);
@ -111,7 +111,8 @@ class EditWidgetDialog extends React.Component {
name = false;
}
this.valid = name;
//this.valid = name;
this.valid = true;
// return state to control
if (target === 'name') return name ? "success" : "error";