Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changing orientation attachment picker issues #2687

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions package/src/components/AttachmentPicker/AttachmentPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { BackHandler, Keyboard, Platform, StyleSheet } from 'react-native';

import BottomSheet, { BottomSheetFlatList } from '@gorhom/bottom-sheet';
Expand Down Expand Up @@ -256,15 +256,11 @@ export const AttachmentPicker = React.forwardRef(
* Snap points changing cause a rerender of the position,
* this is an issue if you are calling close on the bottom sheet.
*/
const snapPoints = useMemo(
() => [initialSnapPoint, finalSnapPoint],
[initialSnapPoint, finalSnapPoint],
);
const snapPoints = [initialSnapPoint, finalSnapPoint];

return (
<>
<BottomSheet
containerHeight={fullScreenHeight}
enablePanDownToClose={true}
handleComponent={
/**
Expand Down
Loading