From c218576d4462d5e28068cf096a823101b6e84bf4 Mon Sep 17 00:00:00 2001 From: snoop Date: Fri, 25 Aug 2017 17:30:56 +0900 Subject: [PATCH] sensor regist vaildate --- .../meta/react/components/SensorItemTree.tsx | 4 +- .../react/components/SensorConfigStepper.tsx | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/src/ts/@overflow/meta/react/components/SensorItemTree.tsx b/src/ts/@overflow/meta/react/components/SensorItemTree.tsx index a5e45c3..5298d2e 100644 --- a/src/ts/@overflow/meta/react/components/SensorItemTree.tsx +++ b/src/ts/@overflow/meta/react/components/SensorItemTree.tsx @@ -150,9 +150,9 @@ export class SensorItemTree extends React.Component {this.ViewSensorItemType()} -

+ }}>Test

*/} ); } diff --git a/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx b/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx index 97c281e..fc05b55 100644 --- a/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx +++ b/src/ts/@overflow/sensor/react/components/SensorConfigStepper.tsx @@ -96,6 +96,13 @@ export class SensorConfigStepper extends React.Component, data: object): void { let step: number = this.state.currentStep; + + let errorStr: string = this.checkSensorData(); + if (errorStr.length > 0) { + alert('Choose ' + errorStr); + return; + } + if (step >= this.props.steps.length + 1) { step = this.props.steps.length + 1; } else { @@ -111,6 +118,60 @@ export class SensorConfigStepper extends React.Component { + if (value.length > 0) { + result = true; + } + }); + + return result; + } + public registSensor(): void { let sensorData = this.props.getSensor(); let sensor: Sensor = {};