Skip to content

Commit dc56417

Browse files
authored
fix: updated initial position to screen height (#657)
1 parent f03b05b commit dc56417

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/components/bottomSheet/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
KEYBOARD_BEHAVIOR,
33
KEYBOARD_BLUR_BEHAVIOR,
44
KEYBOARD_INPUT_MODE,
5-
WINDOW_HEIGHT,
5+
SCREEN_HEIGHT,
66
} from '../../constants';
77

88
// default values
@@ -29,7 +29,7 @@ const INITIAL_CONTAINER_OFFSET = {
2929
right: 0,
3030
};
3131
const INITIAL_HANDLE_HEIGHT = -999;
32-
const INITIAL_POSITION = WINDOW_HEIGHT;
32+
const INITIAL_POSITION = SCREEN_HEIGHT;
3333

3434
export {
3535
DEFAULT_HANDLE_HEIGHT,

src/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Dimensions, Platform } from 'react-native';
22
import Animated, { Easing } from 'react-native-reanimated';
33

44
const { height: WINDOW_HEIGHT, width: WINDOW_WIDTH } = Dimensions.get('window');
5+
const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH } = Dimensions.get('screen');
56

67
enum GESTURE_SOURCE {
78
SCROLLABLE = 0,
@@ -123,6 +124,8 @@ export {
123124
KEYBOARD_STATE,
124125
WINDOW_HEIGHT,
125126
WINDOW_WIDTH,
127+
SCREEN_HEIGHT,
128+
SCREEN_WIDTH,
126129
SCROLLABLE_DECELERATION_RATE_MAPPER,
127130
MODAL_STACK_BEHAVIOR,
128131
KEYBOARD_BEHAVIOR,

0 commit comments

Comments
 (0)