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

v3.0.2-alpha.0 introduces a bug that causes the onDismiss() to not be called on modal dismiss #168

Closed
mr-moto opened this issue Jan 8, 2021 · 4 comments · Fixed by #177
Assignees
Labels
bug Something isn't working modal Related to BottomSheetModal v3 Written in Reanimated v2

Comments

@mr-moto
Copy link
Contributor

mr-moto commented Jan 8, 2021

Bug

v3.0.2-alpha.0 introduces a bug that causes the onDismiss() to not be called on modal dismiss due to wrong animate index value calculations

does not equal 0 so handleOnChange will never trigger thus not adjusting the index to 0 and not calling doDismiss() in BottomSheetModal

Environment info

Library Version
@gorhom/bottom-sheet 3.0.2-alpha.3
react-native 16.13.1
react-native-reanimated 2.0.0-rc.1
react-native-gesture-handler 1.9.0

Steps To Reproduce

  1. run example on 3.0.2-alpha.3
  2. open Simple modal example
  3. present modal -> dismiss modal -> present modal ( will not show again )

Describe what you expected to happen:

  1. modal to appear
@mr-moto mr-moto added the bug Something isn't working label Jan 8, 2021
@gorhom gorhom self-assigned this Jan 8, 2021
@gorhom gorhom added modal Related to BottomSheetModal v3 Written in Reanimated v2 labels Jan 8, 2021
mr-moto added a commit to mr-moto/react-native-bottom-sheet that referenced this issue Jan 8, 2021
gorhom added a commit that referenced this issue Jan 8, 2021
* fixes #168

* chore: revert previous changes

* chore: remove rounding up from use normalized snap points hook

Co-authored-by: Mo Gorhom <gorhom@me.com>
@gorhom
Copy link
Owner

gorhom commented Jan 8, 2021

thanks @mr-moto for spotting this issue and submitting a pr 👏

@gorhom
Copy link
Owner

gorhom commented Jan 11, 2021

this should be resolved with 3.1.0 & 2.0.3 👍

@lexengineer
Copy link

lexengineer commented Jun 5, 2021

@gorhom
This issue is still occurs in the version 3.6.5, when I close the BottomSheetModal onDismiss called from time to time, but not always, this seems to be critical and unpredictable, because I cannot call any handlers onDismiss and be sure that they will be called

@gorhom
Copy link
Owner

gorhom commented Jun 5, 2021

hi @oleksiikiselov , could you test on v4 ?

yarn add @gorhom/bottom-sheet@4.0.0-alpha.9

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

Successfully merging a pull request may close this issue.

3 participants