Skip to content

Commit 93d6423

Browse files
authored
ExpandableCalendar - limit the max open height to the open height (not allowing the user to drag lower) (#2259)
1 parent 68287bb commit 93d6423

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expandableCalendar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ const ExpandableCalendar = (props: ExpandableCalendarProps) => {
336336
};
337337

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

342342
if (!horizontal) {
343343
// vertical CalenderList header

0 commit comments

Comments
 (0)