You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v3.0.20alpha introduces a modal dismiss bug.
If a dismiss function is called from within the modal ( eg button inside modal that calls dismiss() ), handleOnChange will not be called and will prevent the modal from presenting once closed. similar to #168.
the state of _contentGestureState is 2 (onStart) which does not equal END or UNDETERMINED
Environment info
Library
Version
@gorhom/bottom-sheet
3.0.2-alpha.3
react-native
0.63.4
react-native-reanimated
2.0.0-rc.1
react-native-gesture-handler
1.9.0
Steps To Reproduce
run the modal simple example
add a button inside a modal
<TouchableOpacity onPress={()=>modalRef.current.dismiss()}><Text>Dismiss by ref</Text></TouchableOpacity>
<TouchableOpacity onPress={dismissModal}><Text>Dismiss by calling function</Text></TouchableOpacity>
<TouchableOpacity onPress={()=>dismiss('modalName')}><Text>Dismiss by hook</Text></TouchableOpacity>
<TouchableOpacity onPress={dismissAll}><Text>Dismiss All by hook</Text></TouchableOpacity>
present -> dismiss using one of the buttons inside the modal -> present ( does not present )
Describe what you expected to happen:
present modal after dismissing
The text was updated successfully, but these errors were encountered:
the onActive and onEnd is not triggered in the gesture handler. only onStart gets triggered which sets the state to 2 ( which is the same behavior as 3.0.1 ) so I assume we just need to remove that part of the if statement or change it to _contentGestureState === State.START
Bug
v3.0.20alpha
introduces a modal dismiss bug.If a dismiss function is called from within the modal ( eg button inside modal that calls
dismiss()
),handleOnChange
will not be called and will prevent the modal from presenting once closed. similar to #168.react-native-bottom-sheet/src/components/bottomSheet/BottomSheet.tsx
Lines 573 to 574 in 1257c46
the state of
_contentGestureState
is 2 (onStart) which does not equalEND
orUNDETERMINED
Environment info
Steps To Reproduce
Describe what you expected to happen:
The text was updated successfully, but these errors were encountered: