From e6f7a47c99075a39d862308659b904bfaf64a11a Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 4 Nov 2016 11:21:14 -0400 Subject: PLT-4507 Don't mount modals until opened to make resetting state automatic (#4358) * Don't mount modals until opened to make resetting state automatic * Move dimiss handler to be fired after modal exit animation complete --- webapp/components/delete_channel_modal.jsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'webapp/components/delete_channel_modal.jsx') diff --git a/webapp/components/delete_channel_modal.jsx b/webapp/components/delete_channel_modal.jsx index 7ad213395..1b642861a 100644 --- a/webapp/components/delete_channel_modal.jsx +++ b/webapp/components/delete_channel_modal.jsx @@ -20,6 +20,9 @@ export default class DeleteChannelModal extends React.Component { super(props); this.handleDelete = this.handleDelete.bind(this); + this.onHide = this.onHide.bind(this); + + this.state = {show: true}; } handleDelete() { @@ -39,6 +42,10 @@ export default class DeleteChannelModal extends React.Component { ); } + onHide() { + this.setState({show: false}); + } + render() { let channelTerm = (

@@ -84,7 +92,7 @@ export default class DeleteChannelModal extends React.Component {