Fix broken close function in clone campaign modal

This commit is contained in:
Kailash Nadh 2018-12-18 23:55:18 +05:30
parent f54170d509
commit f686606b9e
1 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ class Campaigns extends React.PureComponent {
record: null, record: null,
previewRecord: null, previewRecord: null,
cloneName: "", cloneName: "",
cloneModalVisible: false,
modalWaiting: false modalWaiting: false
} }
@ -353,7 +354,7 @@ class Campaigns extends React.PureComponent {
} }
handleToggleCloneForm = (record) => { handleToggleCloneForm = (record) => {
this.setState({ record: record, cloneName: record.name }) this.setState({ cloneModalVisible: !this.state.cloneModalVisible, record: record, cloneName: record.name })
} }
handleCloneCampaign = (record) => { handleCloneCampaign = (record) => {
@ -410,7 +411,7 @@ class Campaigns extends React.PureComponent {
/> />
} }
{ this.state.record && { this.state.cloneModalVisible && this.state.record &&
<Modal visible={ this.state.record !== null } width="500px" <Modal visible={ this.state.record !== null } width="500px"
className="clone-campaign-modal" className="clone-campaign-modal"
title={ "Clone " + this.state.record.name} title={ "Clone " + this.state.record.name}