From d895efd684b43b5ac820f78e79a10f1beff585ed Mon Sep 17 00:00:00 2001 From: snoop Date: Thu, 17 Aug 2017 16:31:39 +0900 Subject: [PATCH] changed key --- .../react/components/DiscoveryTree.tsx | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/ts/@overflow/discovery/react/components/DiscoveryTree.tsx b/src/ts/@overflow/discovery/react/components/DiscoveryTree.tsx index 5133054..bf989ee 100644 --- a/src/ts/@overflow/discovery/react/components/DiscoveryTree.tsx +++ b/src/ts/@overflow/discovery/react/components/DiscoveryTree.tsx @@ -75,18 +75,8 @@ export class DiscoveryTree extends React.Component { - console.log('aa'); - } - public onCheckPort = (port: Port, key: string) => { - console.log('aa'); - } - public onCheckService = (service: Service, key: string) => { - console.log('aa'); - } - public onCheck = (checkProps: CheckboxProps, checkState: Map, key: string, stateKey: string, - selectedMap: Map, selectedObj: any) => { + selectedMap: Map, selectedObj: Host | Port | Service) => { let newCheckState = _.clone(checkState); newCheckState[key] = !newCheckState[key]; let state: any = {}; @@ -98,6 +88,10 @@ export class DiscoveryTree extends React.Component Host - {host.ports ? (this.state.portState[key] ? this.renderPort(host.ports, index) : null) : null} + {host.ports ? (this.state.portState[key] ? this.renderPort(host.ports, key) : null) : null} , ); @@ -131,7 +125,7 @@ export class DiscoveryTree extends React.Component @@ -170,7 +164,7 @@ export class DiscoveryTree extends React.Component @@ -209,6 +203,16 @@ export class DiscoveryTree extends React.Component