diff options
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r-- | webapp/components/sidebar.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index d20fef603..28b22fc81 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -169,6 +169,12 @@ export default class Sidebar extends React.Component { $('.sidebar--left .nav-pills__container').perfectScrollbar(); } + // reset the scrollbar upon switching teams + if (this.state.currentTeam !== prevState.currentTeam) { + this.refs.container.scrollTop = 0; + $('.nav-pills__container').perfectScrollbar('update'); + } + // close the LHS on mobile when you change channels if (this.state.activeId !== prevState.activeId) { $('.app__body .inner-wrap').removeClass('move--right'); |