From 56da37801401b7dfba93ac8d1bc3946d5442f551 Mon Sep 17 00:00:00 2001 From: Manuel Pitz Date: Thu, 30 Aug 2018 22:23:04 +0200 Subject: [PATCH] Add simulator dialog field check fixed --- src/components/dialogs/new-simulator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/dialogs/new-simulator.js b/src/components/dialogs/new-simulator.js index 3ddd80d..1eb5b34 100644 --- a/src/components/dialogs/new-simulator.js +++ b/src/components/dialogs/new-simulator.js @@ -63,7 +63,7 @@ class NewSimulatorDialog extends React.Component { } resetState() { - this.setState({ name: '', endpoint: 'http://', uuid: '' }); + this.setState({ name: '', endpoint: 'http://', uuid: this.uuidv4()}); } validateForm(target) { @@ -79,7 +79,7 @@ class NewSimulatorDialog extends React.Component { uuid = false; } - this.valid = name || uuid; + this.valid = name && uuid; // return state to control if (target === 'name') return name ? "success" : "error"; @@ -110,7 +110,7 @@ class NewSimulatorDialog extends React.Component { UUID - this.handleChange(e)} /> + this.handleChange(e)} />