Commit 6fa61d07 authored by Sonja Happ's avatar Sonja Happ

initialize temporal widget as empty before it is overwritten with props widget

parent d954941d
......@@ -34,12 +34,7 @@ class EditWidgetDialog extends React.Component {
super(props);
this.state = {
temporal: {
name: '',
simulationModel: '',
signal: 0
}
temporal: {},
};
}
......@@ -73,7 +68,7 @@ class EditWidgetDialog extends React.Component {
}
handleChange(e) {
// TODO: check what we really need in this function. Can we reduce its complexity?
if (e.constructor === Array) {
// Every property in the array will be updated
let changes = e.reduce( (changesObject, event) => {
......@@ -123,11 +118,8 @@ class EditWidgetDialog extends React.Component {
finalChange[e.target.id] = e.target.value;
this.setState({ temporal: finalChange});
}
}
}
resetState() {
......
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