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 new simulation model dialog

Update react-bootstrap to newest version
This commit is contained in:
Markus Grigull 2017-07-26 10:44:04 +02:00
parent 2b5c222bc8
commit 3d4d8d105c
3 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@
"rc-slider": "^7.0.1",
"rd3": "^0.7.4",
"react": "^15.4.2",
"react-bootstrap": "^0.30.7",
"react-bootstrap": "^0.31.1",
"react-contextmenu": "^2.3.0",
"react-d3": "^0.4.0",
"react-dnd": "^2.2.4",

View file

@ -134,7 +134,7 @@ class NewSimulationModelDialog extends Component {
</FormGroup>
<FormGroup controlId="simulator" validationState={this.validateForm('simulator')}>
<ControlLabel>Simulator</ControlLabel>
<FormControl componentClass="select" placeholder="Select simulator" value={this.state.simulator.node + '/' + this.state.simulator.simulator} onChange={(e) => this.handleChange(e)}>
<FormControl componentClass="select" placeholder="Select simulator" value={JSON.stringify({ node: this.state.simulator.node, simulator: this.state.simulator.simulator})} onChange={(e) => this.handleChange(e)}>
{this.props.nodes.map(node => (
node.simulators.map((simulator, index) => (
<option key={node._id + index} value={JSON.stringify({ node: node._id, simulator: index })}>{node.name}/{simulator.name}</option>

View file

@ -60,7 +60,7 @@ class NewSimulatorDialog extends Component {
// check all controls
var name = true;
if (this.state.name === '' || this.props.node.simulators.find(simulator => simulator.name === this.state.name) !== undefined) {
if (this.state.name === '' || this.props.node.simulators == null || this.props.node.simulators.find(simulator => simulator.name === this.state.name) !== undefined) {
name = false;
}