diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx index 7c61d2f2eb..4cb7db28ab 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 ( @@ -269,6 +272,5 @@ export default class MoreDirectChannels extends React.Component { } MoreDirectChannels.propTypes = { - show: React.PropTypes.bool.isRequired, onModalDismissed: React.PropTypes.func };