diff options
Diffstat (limited to 'web/src/js/components')
-rw-r--r-- | web/src/js/components/MainView.js | 2 | ||||
-rw-r--r-- | web/src/js/components/ProxyApp.js | 16 | ||||
-rw-r--r-- | web/src/js/components/flowview/index.js | 1 |
3 files changed, 12 insertions, 7 deletions
diff --git a/web/src/js/components/MainView.js b/web/src/js/components/MainView.js index 19ff5e4d..6172ce77 100644 --- a/web/src/js/components/MainView.js +++ b/web/src/js/components/MainView.js @@ -155,7 +155,7 @@ class MainView extends Component { <div className="main-view"> <FlowTable ref="flowTable" - selectFlow={this.selectFlow} + selectFlow={flow => this.selectFlow(flow)} selected={selectedFlow} /> {selectedFlow && [ diff --git a/web/src/js/components/ProxyApp.js b/web/src/js/components/ProxyApp.js index 33443dcd..71a7bf9b 100644 --- a/web/src/js/components/ProxyApp.js +++ b/web/src/js/components/ProxyApp.js @@ -21,13 +21,19 @@ class ProxyAppMain extends Component { router: PropTypes.object.isRequired, } - constructor() { + constructor(props, context) { + super(props, context) + this.settingsStore = new SettingsStore() // Default Settings before fetch _.extend(this.settingsStore.dict, {}) this.state = { settings: this.settingsStore.dict } + + this.onKeyDown = this.onKeyDown.bind(this) + this.updateLocation = this.updateLocation.bind(this) + this.onSettingsChange = this.onSettingsChange.bind(this) } /** @@ -41,7 +47,7 @@ class ProxyAppMain extends Component { for (const key of Object.keys(queryUpdate || {})) { query[i] = queryUpdate[i] || undefined } - this.context.router.replace({pathname, query}) + this.context.router.replace({ pathname, query }) } /** @@ -101,7 +107,7 @@ class ProxyAppMain extends Component { /** * @todo move to actions */ - onKeydown(e) { + onKeyDown(e) { let name = null switch (e.keyCode) { @@ -140,7 +146,7 @@ class ProxyAppMain extends Component { const { settings } = this.state const query = this.getQuery() return ( - <div id="container" tabIndex="0" onKeyDown={this.onKeydown}> + <div id="container" tabIndex="0" onKeyDown={this.onKeyDown}> <Header ref="header" settings={settings} updateLocation={this.updateLocation} query={query} /> {React.cloneElement( children, @@ -154,7 +160,7 @@ class ProxyAppMain extends Component { </div> ) } -}) +} export default connect( state => ({ diff --git a/web/src/js/components/flowview/index.js b/web/src/js/components/flowview/index.js index 6f4f7395..7f5e9768 100644 --- a/web/src/js/components/flowview/index.js +++ b/web/src/js/components/flowview/index.js @@ -89,7 +89,6 @@ var FlowView = React.createClass({ } else { active = tabs[0]; } - this.selectTab(active); } var prompt = null; |