We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The image picker is closed immediately closed after choosing an option
the action sheet closes until image is choen
the image picker closes immediately with the action sheet
type ChooseImageProviderProps = React.PropsWithChildren; interface ChooseImageMenuProps { visible: boolean; imagePickerOptions: ImagePickerOptions; onChooseImage: (result: ImagePickerResult) => void; onPermissionDeny: (reason: any) => void; onDismiss?: () => void; } type PrmomiseResolveReject = { resolve: (value: ImagePickerResult) => void; reject: (reason: any) => void; }; const ChooseImageMenu: React.FC<ChooseImageMenuProps> = ({ visible, onChooseImage, onPermissionDeny, imagePickerOptions, onDismiss, }) => { const options: ButtonProps[] = useMemo(() => { return [ { label: 'From Media Library', onPress: () => setTimeout(async () => { const permissionResult = await requestMediaLibraryPermissionsAsync(); if (!permissionResult.granted) { onPermissionDeny(permissionResult); } const asset = await launchImageLibraryAsync(imagePickerOptions); onChooseImage(asset); }, 100), }, { label: 'From Camera', onPress: () => setTimeout(async () => { const permissionResult = requestCameraPermissionsAsync(); if (!permissionResult) { onPermissionDeny(permissionResult); } const asset = await launchCameraAsync(imagePickerOptions); onChooseImage(asset); }, 100), }, ]; }, [imagePickerOptions, onChooseImage, onPermissionDeny]); return ( <ActionSheet useSafeArea migrateDialog title={'Choose Image'} message={'Choose an image from'} visible={visible} options={options} onDismiss={onDismiss} /> ); };
expo
expo-image-picker
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The image picker is closed immediately closed after choosing an option
Related to
Steps to reproduce
Expected behavior
the action sheet closes until image is choen
Actual behavior
the image picker closes immediately with the action sheet
More Info
Code snippet
Screenshots/Video
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-20.at.18.14.56.mp4
Environment
expo
: 50.0.14expo-image-picker
: 14.7.1Affected platforms
The text was updated successfully, but these errors were encountered: