Skip to content

Commit

Permalink
fix: refactored snap points reaction to handle keyboard state (#497)
Browse files Browse the repository at this point in the history
* fix: updated snap points reaction to handle keyboard state

* refactor: updated scrollable dismissing keyboard implementation

* refactor: extracted gesture methods from gesture hook

* chore: remove enableFlashScrollableIndicatorOnExpand
  • Loading branch information
gorhom committed Jun 26, 2021
1 parent 49e4772 commit f8f2417
Show file tree
Hide file tree
Showing 15 changed files with 599 additions and 553 deletions.
5 changes: 2 additions & 3 deletions example/src/screens/advanced/KeyboardHandlingExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const KeyboardHandlingExample = () => {
const bottomSheetRef = useRef<BottomSheet>(null);

// variables
const snapPoints = useMemo(() => [SEARCH_HANDLE_HEIGHT, 300], []);
const snapPoints = useMemo(() => [SEARCH_HANDLE_HEIGHT + 34, 500], []);

// callbacks
const handleToggleKeyboardBehavior = useCallback(() => {
Expand Down Expand Up @@ -71,13 +71,12 @@ const KeyboardHandlingExample = () => {
<Button label="Close" onPress={handleClosePress} />
<BottomSheet
ref={bottomSheetRef}
index={1}
snapPoints={snapPoints}
keyboardBehavior={keyboardBehavior}
keyboardBlurBehavior={keyboardBlurBehavior}
handleComponent={SearchHandle}
>
<ContactList count={10} type="ScrollView" />
<ContactList count={12} type="FlatList" />
</BottomSheet>
</View>
);
Expand Down
Loading

0 comments on commit f8f2417

Please sign in to comment.