From 740ab87c423ae7254f59f30f97640c05004f5041 Mon Sep 17 00:00:00 2001 From: mama Date: Thu, 11 May 2017 11:21:02 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20Une=20/regle=20avec=20example=20activ?= =?UTF-8?q?=C3=A9=20persistait?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Au changement de route, la page n'était pas mise à jour --- source/components/rule/Rule.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js index ec59ca0cc..cfeba2253 100644 --- a/source/components/rule/Rule.js +++ b/source/components/rule/Rule.js @@ -34,8 +34,10 @@ export default class Rule extends Component { } componentWillReceiveProps(nextProps){ let get = R.path(['match', 'params', 'name']) - if (get(nextProps) !== get(this.props)) + if (get(nextProps) !== get(this.props)) { this.setRule(get(nextProps)) + this.setState({example: null, showValues: false}) + } } setRule(name){ this.rule = analyseSituation(decodeRuleName(name))(this.props.situationGate)