From 84f180847d0e63dd6e12a82cebaf7fe4ffad040d Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 9 Mar 2016 13:30:46 +0800 Subject: [web] dont mutate props --- web/src/js/components/eventlog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web/src') 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 () { -- cgit v1.2.3