diff --git a/src/ic/edit-ic.js b/src/ic/edit-ic.js index be77e27..55f8f52 100644 --- a/src/ic/edit-ic.js +++ b/src/ic/edit-ic.js @@ -17,7 +17,6 @@ import React from 'react'; import { Form } from 'react-bootstrap'; -import _ from 'lodash'; import Dialog from '../common/dialogs/dialog'; import ParametersEditor from '../common/parameters-editor'; @@ -36,15 +35,15 @@ class EditICDialog extends React.Component { type: '', category: '', managedexternally: false, - startParameterSchema: {}, - properties: {} + startparameterschema: {} }; } + onClose(canceled) { if (canceled === false) { if (this.valid) { - let data = this.props.ic; + let data = JSON.parse(JSON.stringify(this.props.ic)); if (this.state.name != null && this.state.name !== "" && this.state.name !== this.props.ic.name) { data.name = this.state.name; @@ -69,12 +68,8 @@ class EditICDialog extends React.Component { data.category = this.state.category; } - if (this.state.startParameterSchema !== {}) { - data.startParameterSchema = this.state.startParameterSchema; - } - - if (this.state.properties !== {}) { - data.properties = this.state.properties; + if (this.state.startparameterschema !== {}) { + data.startparameterschema = this.state.startparameterschema; } data.managedexternally = this.state.managedexternally; @@ -98,11 +93,7 @@ class EditICDialog extends React.Component { } handleStartParameterSchemaChange(data) { - this.setState({ startParameterSchema: data }); - } - - handlePropertiesChange(data) { - this.setState({ properties: data }); + this.setState({ startparameterschema: data }); } resetState() { @@ -115,8 +106,7 @@ class EditICDialog extends React.Component { description: this.props.ic.description, category: this.props.ic.category, managedexternally: false, - startParameterSchema: this.props.ic.startParameterSchema, - properties: this.props.ic.properties, + startparameterschema: this.props.ic.startparameterschema, }); } @@ -196,22 +186,15 @@ class EditICDialog extends React.Component { this.handleChange(e)} /> - + Start parameter schema of IC this.handleStartParameterSchemaChange(data)} + disabled={false} /> - - Properties - this.handlePropertiesChange(data)} - /> - + );