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
Hello,
I am experiencing an unexpected issue in my application. The problem occurs when state value changes. The modal opens normally and it automatically closes when value change. Probably it's an rerender problem, idk.
Expected Behavior:
The modal should not close when the state value changes. The user should be able to keep the modal open and continue their operations.
Actual Behavior:
The modal automatically closes when the value change.
Resolution:
I found that switching BottomSheet to BottomSheetModal resolved the issue, and the modal behaves as expected without closing unexpectedly. You can check it at the Expo Snack link.
+1 We have the same problem. Unable to get any logs or anything. No explanation for it. Sometimes it disappears, sometimes it doesn't. It is not due to snapPoints to 0 or anything. There is also no way to get the status of the bottom sheet, making it impossible to catch this behavior and handle it correctly. Please fix this asap.
Ugly workaround for now for those experiencing the same problem: useEffect(() => { if(bottomSheetRef?.current) setTimeout(() => bottomSheetRef?.current && bottomSheetRef?.current.snapToIndex(0), 1000); }, [bottomSheetRef?.current]);
I'm having a similar issue. I load my app with an index of -1. Then I click on a marker on a map, it sets some data about that marker to the state and snaps the index to 1. the next time I click a marker the sheet goes to an index of -1. But after that initial flicker, the data in the sheet will update without it going away.
I also notice that when this happens, onClose is called twice. But I don't have any code that is calling the sheet to do anything except snap to index.
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS
What happened?
Hello,
I am experiencing an unexpected issue in my application. The problem occurs when state value changes. The modal opens normally and it automatically closes when value change. Probably it's an rerender problem, idk.
Expected Behavior:
The modal should not close when the state value changes. The user should be able to keep the modal open and continue their operations.
Actual Behavior:
The modal automatically closes when the value change.
Resolution:
I found that switching BottomSheet to BottomSheetModal resolved the issue, and the modal behaves as expected without closing unexpectedly. You can check it at the Expo Snack link.
Versions:
Reproduction steps
Reproduction sample
https://snack.expo.dev/@boraoksuzoglu/bottom-sheet---issue-reproduction-template?platform=ios
Relevant log output
The text was updated successfully, but these errors were encountered: