aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js
diff options
context:
space:
mode:
authorLegend Tang <sp3478@gmail.com>2015-03-06 03:45:58 +0800
committerLegend Tang <sp3478@gmail.com>2015-03-06 03:45:58 +0800
commit36db55f6620d428eee8e4c4a29c42396db3cd4d2 (patch)
treec26f31352587c2f904afff4acc80f4f53ca1abef /web/src/js
parentb903dd4e4a3da579e4629a5e992ab16740d440f7 (diff)
downloadmitmproxy-36db55f6620d428eee8e4c4a29c42396db3cd4d2.tar.gz
mitmproxy-36db55f6620d428eee8e4c4a29c42396db3cd4d2.tar.bz2
mitmproxy-36db55f6620d428eee8e4c4a29c42396db3cd4d2.zip
Replace `addListener` method with multiple bindings, fix for #503 504
Diffstat (limited to 'web/src/js')
-rw-r--r--web/src/js/components/flowtable.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/web/src/js/components/flowtable.js b/web/src/js/components/flowtable.js
index d4515257..76c865e2 100644
--- a/web/src/js/components/flowtable.js
+++ b/web/src/js/components/flowtable.js
@@ -65,15 +65,24 @@ var FlowTable = React.createClass({
},
componentWillMount: function () {
if (this.props.view) {
- this.props.view.addListener("add update remove recalculate", this.onChange);
+ this.props.view.addListener("add", this.onChange);
+ this.props.view.addListener("update", this.onChange);
+ this.props.view.addListener("remove", this.onChange);
+ this.props.view.addListener("recalculate", this.onChange);
}
},
componentWillReceiveProps: function (nextProps) {
if (nextProps.view !== this.props.view) {
if (this.props.view) {
- this.props.view.removeListener("add update remove recalculate");
+ this.props.view.removeListener("add");
+ this.props.view.removeListener("update");
+ this.props.view.removeListener("remove");
+ this.props.view.removeListener("recalculate");
}
- nextProps.view.addListener("add update remove recalculate", this.onChange);
+ nextProps.props.view.addListener("add", this.onChange);
+ nextProps.props.view.addListener("update", this.onChange);
+ nextProps.props.view.addListener("remove", this.onChange);
+ nextProps.props.view.addListener("recalculate", this.onChange);
}
},
getDefaultProps: function () {