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

Controlling the drawer not working on example app #16

Open
betoharres opened this issue Jun 15, 2020 · 3 comments
Open

Controlling the drawer not working on example app #16

betoharres opened this issue Jun 15, 2020 · 3 comments

Comments

@betoharres
Copy link

betoharres commented Jun 15, 2020

Current Behavior

I'm trying to control the drawer position from the ref variable using the snapTo method.

  • What code are you running and what is happening?
    Running example code from horizontal screen.

Expected Behavior

  • What do you expect should be happening?
    Pressing X to fully close the drawer.

How to reproduce

  • You must provide a way to reproduce the problem.
    1- clone the project
    2- run the expo client(I'm running on android)
    3- select horizontal screen
    4- swipe the drawer up
    5- press the X button
    6- (the problem) the drawer stucks in the middle(wrong result of action)

Your Environment

System:
    OS: Linux 5.1 Arch Linux
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 2.29 GB / 15.59 GB
    Shell: 5.7.1 - /usr/bin/zsh
  Binaries:
    Node: 12.10.0 - /usr/bin/node
    Yarn: 1.17.3 - /usr/bin/yarn
    npm: 6.11.3 - /usr/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    Android SDK:
      API Levels: 16, 26, 28, 29
      Build Tools: 26.0.3, 28.0.3, 29.0.0
      System Images: android-16 | Intel x86 Atom, android-16 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: 21.0.6113669
  npmPackages:
    react: ~16.9.0 => 16.9.0
    react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
  npmGlobalPackages:
    react-native-cli: 2.0.1

Observations: I also tried to control the drawer in my current project. I've ditched my own component because this one looks awesome(Thanks for the great component)! But I"m having a hard time controlling the drawer. The snapTo is not responding properly to the argument I'm giving it; it only fully opens at first call(even though the argument was to open at middle position) and does not animate to any position in the remaining calls.
I've tried to execute the example app and found out that the drawer is not outputting the exact same actions as in the gif in the README is as well.

@rgommezz
Copy link
Owner

Hey @betoharres,

I've spent some time debugging the example project on Android and I am not able to reproduce the issue you are reporting. Btw, instead of cloning locally the repository, you can directly open the example here on Android: https://expo.io/@rgommezz/react-native-scroll-bottom-sheet-example

If it still happens, could you record some short video or provide a reproducible snack? Also, it'd be useful to know the Android phone model and OS version

@djorkaeffalexandre
Copy link
Contributor

Since this is a description about the problem that my pr #10 fixed, you can try this snack:
https://snack.expo.io/@djorkaeff/bottom-sheet-snap
Look at this and how it open at the fully opens snap even we pass the medium point at the snapTo.

@betoharres
Copy link
Author

@rgommezz sure, you want me to record the expo or the android emulator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants