Skip to content

Commit

Permalink
fix(Dropdown): Position DropdownContainer when list of options reduces
Browse files Browse the repository at this point in the history
  • Loading branch information
guilebarbosa committed Jul 23, 2019
1 parent b5df53f commit d715d01
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class DropdownContainer extends Component<
};
case 'top-left':
return {
top: anchorDimensionsAndPositon.top - dropdownDimensions.height,
bottom: window.innerHeight - anchorDimensionsAndPositon.top,
left: anchorDimensionsAndPositon.left,
};
case 'bottom-right':
Expand All @@ -157,7 +157,7 @@ class DropdownContainer extends Component<
};
case 'top-right':
return {
top: anchorDimensionsAndPositon.top - dropdownDimensions.height,
bottom: window.innerHeight - anchorDimensionsAndPositon.top,
left:
anchorDimensionsAndPositon.left -
(dropdownDimensions.width - anchorDimensionsAndPositon.width),
Expand Down

0 comments on commit d715d01

Please sign in to comment.