From b9d2defbb7e5782a48ccac7122e78f29141f88f4 Mon Sep 17 00:00:00 2001 From: Christian Fuentes Date: Wed, 4 Jul 2018 15:12:16 +0200 Subject: [PATCH] Avoid having isShow as true after handleCancel action --- src/GoodByeProvider.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GoodByeProvider.js b/src/GoodByeProvider.js index f380591..b300d28 100644 --- a/src/GoodByeProvider.js +++ b/src/GoodByeProvider.js @@ -27,19 +27,19 @@ class Provider extends React.Component { }; handleOk = () => { - this.pass(true); this.setState({ isShow: false }); + this.pass(true); }; handleCancel = () => { - this.pass(false); this.setState({ isShow: false }); + this.pass(false); }; handlePass = bool => { - this.pass(bool); this.setState({ isShow: false }); - } + this.pass(bool); + }; render() { const { children } = this.props;