Skip to content

Commit

Permalink
fix(community-side-navigation): fix sidenav jump to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-K-Lam authored and theetrain committed Jan 8, 2019
1 parent dc43d66 commit 845f1e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/SideNavigation/SideNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ class SideNavigation extends Component {
sideNavRect.height > containerRect.height
) {
this.setState({ variant: 'top' })
} else if (
(sideNavRect.bottom > containerRect.bottom || sideNavRect.bottom <= 0) &&
sideNavRect.height <= containerRect.height
) {
this.setState({ variant: 'bottom' })
} else if (
this.checkOverflow(this._sideNav) &&
sideNavRect.bottom <= containerRect.bottom &&
Expand All @@ -94,6 +89,11 @@ class SideNavigation extends Component {
sideNavRect.height < containerRect.height
) {
this.setState({ variant: 'fixed' })
} else if (
(sideNavRect.bottom > containerRect.bottom || sideNavRect.bottom <= 0) &&
sideNavRect.height <= containerRect.height
) {
this.setState({ variant: 'bottom' })
}
}

Expand Down

0 comments on commit 845f1e5

Please sign in to comment.