diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-11-04 11:21:14 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-04 11:21:14 -0400 |
commit | e6f7a47c99075a39d862308659b904bfaf64a11a (patch) | |
tree | 863f6eb80a2367fb080437d9e037fca283e3c270 /webapp/components/sidebar.jsx | |
parent | dbdd719c51d061dfc327644d4b2ca89a0595b4f1 (diff) | |
download | chat-e6f7a47c99075a39d862308659b904bfaf64a11a.tar.gz chat-e6f7a47c99075a39d862308659b904bfaf64a11a.tar.bz2 chat-e6f7a47c99075a39d862308659b904bfaf64a11a.zip |
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
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r-- | webapp/components/sidebar.jsx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index 21df429f7..08f89c2ff 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -715,6 +715,16 @@ export default class Sidebar extends React.Component { } } + let moreDirectChannelsModal; + if (this.state.showDirectChannelsModal) { + moreDirectChannelsModal = ( + <MoreDirectChannels + show={true} + onModalDismissed={this.hideMoreDirectChannelsModal} + /> + ); + } + return ( <div className='sidebar--left' @@ -726,10 +736,7 @@ export default class Sidebar extends React.Component { channelType={this.state.newChannelModalType} onModalDismissed={this.hideNewChannelModal} /> - <MoreDirectChannels - show={this.state.showDirectChannelsModal} - onModalDismissed={this.hideMoreDirectChannelsModal} - /> + {moreDirectChannelsModal} <SidebarHeader teamDisplayName={this.state.currentTeam.display_name} |