-
-
Notifications
You must be signed in to change notification settings - Fork 785
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
[v5] Modal reopens while opening second, and while dismissing first modal #1561
Comments
Same issue here, this was fine in v4 |
@enchorb yeah same :( iam using v5 because of web support |
Same problem in
My temporary solution is to add a delay function in the middle : xxx.current?.close();
await delay(600);
xxx.current?.present(); |
@Simoon-Fyes, I use delay too, but it looks laggy :( |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
the bug still exists |
yeap, I confirm, still exists! |
anyone find a work around? |
I'm using delays now, but it's still buggy |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
the bug still exists |
any suggestion to solve this problem? |
my workaround is..
The downside to this approach is that you don't get the animation of the modal closing when it switches to sheetOpen=false. I would love to use a better solution if someone has one!! This is a work around.
|
Same here |
This works for me!!! |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
bug still exists |
Hey, I'm trying to reproduce your workaround. However you didn't provide your imports, could you tell me what is "Portal" ? Also, are you importing "BottomSheet" from "@gorhom/bottom-sheet" ? Because it says this : "'"@gorhom/bottom-sheet"' has no exported member named 'BottomSheet'. Did you mean 'useBottomSheet'?ts(2724) when I type import { BottomSheet } from "@gorhom/bottom-sheet"; Thank you. |
Here are my imports, I'm not sure why BottomSheet isn't resolving for you..
|
Thank you very much, It was because I was writing "{ BottomSheet }" instead of "BottomSheet" |
Could you please provide an example of a use the Sheet component you created ? Thank you. |
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
bug still exists |
bug still exists |
I solved this issue using a
bottomSheetModalRef.current?.close();
await sleepAsync(200);
// Do anything else with the page |
@gorhom i get this issue when i set the first modal to be enableDismissonClose={false} |
Facing this and similar possibly related issue in latest alpha as well. Using dismiss() makes the dismissed sheet pop back up no matter what you do in case there is some change in state or data that triggers rendering in the sheet. Using close() fixes the issue partially but in my case I also had to delay any data/state changes for more than 250ms (this is the time for the sheet to fully animate). |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
bug still exists |
You can fix this using this props on the modal |
Maybe not perfect but this is what I'm doing to work around both the "Reduce Motion" issue and this issue. When "Reduce Motion" is off then I just don't use this animation override at all. (I am on
|
Bug
Maybe similiar to #204
I have 2 modals and global state. When global state updates i dismiss first modal and open second modal
1.mp4
2.mp4
Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
I thought that the modal is reopened because the global state changes, but this is not the case: while opening the second modal and closing the first modal, the second modal still reopens
The text was updated successfully, but these errors were encountered: