Skip to content

Commit

Permalink
popover changes
Browse files Browse the repository at this point in the history
  • Loading branch information
waterim committed Aug 14, 2023
1 parent bebbaa2 commit 9520803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/PopoverWithMeasuredContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ function PopoverWithMeasuredContent(props) {
const verticalShift = computeVerticalShift(adjustedAnchorPosition.top, popoverHeight, windowHeight);
const shiftedAnchorPosition = {
left: adjustedAnchorPosition.left + horizontalShift,
top: adjustedAnchorPosition.top + verticalShift,
bottom: windowHeight - (adjustedAnchorPosition.top + popoverHeight) - verticalShift,
};
return isContentMeasured ? (
<Popover
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
anchorPosition={shiftedAnchorPosition}
>
{props.children}
<View onLayout={measurePopover}>{props.children}</View>
</Popover>
) : (
/*
Expand Down

0 comments on commit 9520803

Please sign in to comment.