From 52f8217b77a7afe78b96ee17281afb59af75193d Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Tue, 30 Oct 2018 11:18:15 +0530 Subject: [PATCH] Fix form state locking on save --- frontend/my/src/Campaign.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/my/src/Campaign.js b/frontend/my/src/Campaign.js index 1d8c005..e21aa0b 100644 --- a/frontend/my/src/Campaign.js +++ b/frontend/my/src/Campaign.js @@ -225,12 +225,14 @@ class TheFormDef extends React.PureComponent { this.setState({ loading: false }) }).catch(e => { notification["error"]({ message: "Error", description: e.message }) + this.setState({ loading: false }) }) } else { this.props.modelRequest(cs.ModelCampaigns, cs.Routes.UpdateCampaign, cs.MethodPut, { ...values, id: this.props.record.id }).then((resp) => { notification["success"]({ placement: "topRight", message: "Campaign updated", description: `"${values["name"]}" updated` }) + this.setState({ loading: false }) }).catch(e => { notification["error"]({ message: "Error", description: e.message }) this.setState({ loading: false })