-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
How are "present" and "dismiss" methods are intended to be used with BottomSheetModals? #336
Comments
you do not need to dismiss the first modal, the library already handle that for you
you can set |
Thanks. Tried this already but for some reason |
ahh ,,could you provide a reproducible sample code ? preferable from |
So this is the issue I'm having with just using I have screen "A" and screen "B". I So what I'm trying to achieve is basically a list screen (screen A) and a details screen (screen B) but navigating between them breaks after a while. Using the latest v2 of the package. Screen.Recording.2021-03-10.at.9.35.02.mov |
I've pushed a fix for the stuck modal issue as part of this PR: #337 recording.mov |
there is already pr , which refactor the modal handling #327 |
this should be fixed with |
Ask your Question
Hello,
So I'm using 2 modals on my screen, and I need to jump from one to the other and vice versa. After reading the documentation, at first I used the
dismiss()
method on the ref of the currently active modal, andpresent()
on the next modal to switch, which worked, but once I dismissed the modal, I couldn't go back to it (same withclose()
), present doesn't work on those anymore.The way it works for me is just calling
present()
on the modal I want to open, without dismissing. Is this the intended behaviour?My second issue that is kind of related: When the user was on #1 snap point, went to the second modal, then went back to the first with calling
present()
, the first modal would be on #0 snap point. I couldn't find a way to present the modal on #1 snap point instead of the default index. (please note in every other scenario my default has to be #0 snap point, but in this specific case I want it to open at #1. Is that currently implemented?I tried to use
snapTo(1)
after callingpresent()
which only worked with a timeout, but it doesn't look good.TLDR for the second: Can you call
present()
on a modal and animate it to a given snap index fluidly?The text was updated successfully, but these errors were encountered: