Commit bb08991e authored by Laura Fuentes Grau's avatar Laura Fuentes Grau

fix for issues while adding a new dashboard

parent ae830bb6
......@@ -69,7 +69,7 @@ class NewDashboardDialog extends React.Component {
return (
<Dialog show={this.props.show} title="New Dashboard" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="name" validationState={this.validateForm('name')}>
<FormGroup controlId="name" validationstate={this.validateForm('name')}>
<FormLabel>Name</FormLabel>
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
<FormControl.Feedback />
......
......@@ -292,12 +292,12 @@ class Scenario extends React.Component {
closeNewDashboardModal(data) {
this.setState({ newDashboardModal : false });
let newDashboard = data;
// add default grid value and scenarioID
newDashboard["grid"] = 15;
newDashboard["scenarioID"] = this.state.scenario.id;
if (data) {
let newDashboard = data;
// add default grid value and scenarioID
newDashboard["grid"] = 15;
newDashboard["scenarioID"] = this.state.scenario.id;
AppDispatcher.dispatch({
type: 'dashboards/start-add',
data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment