Fix state setting on subscriber modal unmount
This commit is contained in:
parent
b461f51275
commit
72cf9e2d9b
|
@ -59,7 +59,6 @@ class CreateFormDef extends React.PureComponent {
|
||||||
notification["success"]({ message: "Subscriber added", description: `${values["email"]} added` })
|
notification["success"]({ message: "Subscriber added", description: `${values["email"]} added` })
|
||||||
this.props.fetchRecords()
|
this.props.fetchRecords()
|
||||||
this.props.onClose()
|
this.props.onClose()
|
||||||
this.setState({ modalWaiting: false })
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
notification["error"]({ message: "Error", description: e.message })
|
notification["error"]({ message: "Error", description: e.message })
|
||||||
this.setState({ modalWaiting: false })
|
this.setState({ modalWaiting: false })
|
||||||
|
@ -74,7 +73,6 @@ class CreateFormDef extends React.PureComponent {
|
||||||
// Reload the table.
|
// Reload the table.
|
||||||
this.props.fetchRecords()
|
this.props.fetchRecords()
|
||||||
this.props.onClose()
|
this.props.onClose()
|
||||||
this.setState({ modalWaiting: false })
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
notification["error"]({ message: "Error", description: e.message })
|
notification["error"]({ message: "Error", description: e.message })
|
||||||
this.setState({ modalWaiting: false })
|
this.setState({ modalWaiting: false })
|
||||||
|
|
Loading…
Reference in New Issue