diff --git a/src/ts/@overflow/meta/react/components/SensorItemTree.tsx b/src/ts/@overflow/meta/react/components/SensorItemTree.tsx index 0c5d9a5..3dd2c0d 100644 --- a/src/ts/@overflow/meta/react/components/SensorItemTree.tsx +++ b/src/ts/@overflow/meta/react/components/SensorItemTree.tsx @@ -24,7 +24,7 @@ export type SensorItemTreeProps = SensorItemTreeStateProps & SensorItemTreeDispa export interface SensorItemTreeState { - portState: { [key: number]: boolean }; + portState: Map; } interface TreeItem { @@ -42,7 +42,7 @@ export class SensorItemTree extends React.Component { + // this.state.portState[key] = false; elems.push( - + { + + let newPortState: Map = new Map(this.state.portState); + newPortState[key] = true; + this.setState({ portState: newPortState }); + + }} /> Category - {this.ViewSensorItem(data.metaSensorItemList)} + {this.state.portState[key] ? this.ViewSensorItem(data.metaSensorItemList) : ''} , ); diff --git a/src/ts/@overflow/sensor/react/components/SensorConfiguration.tsx b/src/ts/@overflow/sensor/react/components/SensorConfiguration.tsx index a23d8ff..4dacbbe 100644 --- a/src/ts/@overflow/sensor/react/components/SensorConfiguration.tsx +++ b/src/ts/@overflow/sensor/react/components/SensorConfiguration.tsx @@ -4,6 +4,8 @@ import { Grid, Image, Label, Segment, Dropdown, Input, List, Accordion, Loader } import MetaCrawler from '@overflow/meta/api/model/MetaCrawler'; +import SensorItemTree from '@overflow/meta/react/SensorItemTree'; + export interface SensorConfigurationStateProps { } @@ -28,7 +30,7 @@ export class SensorConfiguration extends React.Component, , ]; + let steps = [, , ]; return ( @@ -143,6 +145,7 @@ export class ConfigStepper extends React.Component +













); }