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

compatibility with new react version and ES6

This commit is contained in:
Sonja Happ 2020-02-05 11:43:45 +01:00
parent ec01ba7d8f
commit aefd73c398

View file

@ -36,7 +36,7 @@ class ImportSimulationModelDialog extends React.Component {
};
}
onClose = canceled => {
onClose(canceled){
if (canceled) {
this.props.onClose();
@ -88,7 +88,7 @@ class ImportSimulationModelDialog extends React.Component {
render() {
return (
<Dialog show={this.props.show} title="Import Simulation Model" buttonTitle="Import" onClose={this.onClose} onReset={this.resetState} valid={this.imported}>
<Dialog show={this.props.show} title="Import Simulation Model" buttonTitle="Import" onClose={(c) => this.onClose(c)} onReset={this.resetState} valid={this.imported}>
<form>
<FormGroup controlId='file'>
<FormLabel>Simulation Model File</FormLabel>
@ -97,7 +97,7 @@ class ImportSimulationModelDialog extends React.Component {
<FormGroup controlId='simulator'>
<FormLabel>Simulator</FormLabel>
<FormControl disabled={this.imported === false} componentClass='select' placeholder='Select simulator' value={this.state.model.simulator} onChange={this.handleSimulatorChange}>
<FormControl disabled={this.imported === false} as='select' placeholder='Select simulator' value={this.state.model.simulator} onChange={this.handleSimulatorChange}>
{this.props.simulators.map(simulator => (
<option key={simulator.id} value={simulator.id}>{_.get(simulator, 'properties.name') || _.get(simulator, 'rawProperties.name')}</option>
))}