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

Snap point of '0%' throws error #54

Closed
Johan-dutoit opened this issue Nov 3, 2020 · 2 comments
Closed

Snap point of '0%' throws error #54

Johan-dutoit opened this issue Nov 3, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Johan-dutoit
Copy link

Johan-dutoit commented Nov 3, 2020

Bug

Is having a bottom sheet completely hidden/off the screen against design guidelines, or simply missed?

Environment info

Library Version
@gorhom/bottom-sheet 2.0.0-alpha.0
react-native 0.63.3
react-native-reanimated 2.0.0-alpha.7
react-native-gesture-handler 1.8.0

Steps To Reproduce

  1. Set any bottom sheet with a snap point that contains '0%' (i.e. ['0%', '80%'])

Describe what you expected to happen:

  1. To allow the user to completely 'swipe away' the bottom sheet.

Reproducible sample code

<BottomSheet
  ref={bsRef}
  initialSnapIndex={-1}
  onChange={onBottomSheetChanged}
  animatedPositionIndex={position}
  snapPoints={['0%', '80%']}>
...
</BottomSheet>
@Johan-dutoit Johan-dutoit added the bug Something isn't working label Nov 3, 2020
@alz10
Copy link

alz10 commented Nov 3, 2020

you can put 0 or -1

@Johan-dutoit
Copy link
Author

No idea why I didn't try 0 on it's own. Closing.

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

No branches or pull requests

2 participants