diff options
-rw-r--r-- | mitmproxy/web/static/app.js | 5 | ||||
-rw-r--r-- | web/src/js/components/eventlog.js | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mitmproxy/web/static/app.js b/mitmproxy/web/static/app.js index bb06970e..b939da74 100644 --- a/mitmproxy/web/static/app.js +++ b/mitmproxy/web/static/app.js @@ -999,8 +999,9 @@ var EventLogContents = _react2.default.createClass({ }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (nextProps.filter !== this.props.filter) { - this.props.filter = nextProps.filter; // Dirty: Make sure that view filter sees the update. - this.state.view.recalculate(); + this.state.view.recalculate(function (entry) { + return nextProps.filter[entry.level]; + }); } }, getDefaultProps: function getDefaultProps() { diff --git a/web/src/js/components/eventlog.js b/web/src/js/components/eventlog.js index 650f7cd3..51f1578e 100644 --- a/web/src/js/components/eventlog.js +++ b/web/src/js/components/eventlog.js @@ -58,8 +58,9 @@ var EventLogContents = React.createClass({ }, componentWillReceiveProps: function (nextProps) { if (nextProps.filter !== this.props.filter) { - this.props.filter = nextProps.filter; // Dirty: Make sure that view filter sees the update. - this.state.view.recalculate(); + this.state.view.recalculate(entry => + nextProps.filter[entry.level] + ); } }, getDefaultProps: function () { |