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

[Bug]:not closing sheet when it click outside off sheet for BottomSheet type #2092

Closed
gurkan-baykan opened this issue Dec 23, 2024 · 2 comments
Labels
bug Something isn't working no-issue-activity

Comments

@gurkan-baykan
Copy link

gurkan-baykan commented Dec 23, 2024

Version

v5

Reanimated Version

v3

Gesture Handler Version

v2

Platforms

iOS, Android

What happened?

When the bottom type is BottomSheet, by default, for example, I want the snap point to drop to the first value when I click outside the sheet after dragging the sheet, which is 100px from the bottom, to the max value of the snap points, that is, the image at the first moment it is opened, this behavior works in BottomSheetModal type, but the same cannot be said for BottomSheet, can you help me how to fix this?

Reproduction steps


 <BottomSheet
            enableContentPanningGesture={true}
            snapPoints={[60,315]}
            headerComponent={<Header />}
            children={<Context />}
            enableOverDrag={false}
            enablePanDownToClose={false}
            duration={50}
            type="inside"
            ref={accountRef}
            enabledWithoutHandle={false}
            backgroundComponent={props => <BottomSheetBackground {...props} />}
          />

 <BottomSheetBackdrop
          {...props}
          style={[props.style, customBackDropColor && { backgroundColor: customBackDropColor }]}
          onPress={() => {
            Keyboard.dismiss();

            handleSnapToIndex(0);
          }}
          pressBehavior={'close'}
          opacity={0.5}
          disappearsOnIndex={type === 'modal' ? -1 : 0}
          appearsOnIndex={type === 'modal' ? 1 : 0}
        />

Reproduction sample

https://snack.expo.dev/@gorhom/bottom-sheet---issue-reproduction-template

Relevant log output

test
@gurkan-baykan gurkan-baykan added the bug Something isn't working label Dec 23, 2024
@gurkan-baykan gurkan-baykan changed the title [Bug]:not closing sheet when it click outside off sheet for inside type [Bug]:not closing sheet when it click outside off sheet for BottomSheet type Dec 23, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

1 participant