diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-11-08 09:58:17 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-08 09:58:17 -0500 |
commit | 40e8fbaa626cbb34e2bb0f9317511c68c93d4044 (patch) | |
tree | c511ec81ef32e5a12d5bfa7df69398fd45dfd843 /webapp | |
parent | a6526aa03d416380e419a727697d910fb05c3163 (diff) | |
download | chat-40e8fbaa626cbb34e2bb0f9317511c68c93d4044.tar.gz chat-40e8fbaa626cbb34e2bb0f9317511c68c93d4044.tar.bz2 chat-40e8fbaa626cbb34e2bb0f9317511c68c93d4044.zip |
Fix switching to DMs from more DM list (#4494)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/more_direct_channels.jsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx index 7c61d2f2e..4cb7db28a 100644 --- a/webapp/components/more_direct_channels.jsx +++ b/webapp/components/more_direct_channels.jsx @@ -39,6 +39,7 @@ export default class MoreDirectChannels extends React.Component { users: null, loadingDMChannel: -1, listType: 'team', + show: true, search: false }; } @@ -61,15 +62,17 @@ export default class MoreDirectChannels extends React.Component { } handleHide() { - if (this.props.onModalDismissed) { - this.props.onModalDismissed(); - } + this.setState({show: false}); } handleExit() { if (this.exitToDirectChannel) { browserHistory.push(this.exitToDirectChannel); } + + if (this.props.onModalDismissed) { + this.props.onModalDismissed(); + } } handleShowDirectChannel(teammate, e) { @@ -226,7 +229,7 @@ export default class MoreDirectChannels extends React.Component { return ( <Modal dialogClassName='more-modal more-direct-channels' - show={this.props.show} + show={this.state.show} onHide={this.handleHide} onExited={this.handleExit} > @@ -269,6 +272,5 @@ export default class MoreDirectChannels extends React.Component { } MoreDirectChannels.propTypes = { - show: React.PropTypes.bool.isRequired, onModalDismissed: React.PropTypes.func }; |