Skip to content

Commit

Permalink
ExpandableCalendar - limit the max open height to the open height (no…
Browse files Browse the repository at this point in the history
…t allowing the user to drag lower) (wix#2259)
  • Loading branch information
Inbal-Tish authored Jun 20, 2023
1 parent 68287bb commit 93d6423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expandableCalendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ const ExpandableCalendar = (props: ExpandableCalendarProps) => {
};

const handlePanResponderMove = (_: GestureResponderEvent, gestureState: PanResponderGestureState) => {
// limit min height to closed height
_wrapperStyles.current.style.height = Math.max(closedHeight, _height.current + gestureState.dy);
// limit min height to closed height and max to open height
_wrapperStyles.current.style.height = Math.min(Math.max(closedHeight, _height.current + gestureState.dy), openHeight.current);

if (!horizontal) {
// vertical CalenderList header
Expand Down

0 comments on commit 93d6423

Please sign in to comment.