-
Notifications
You must be signed in to change notification settings - Fork 113
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 to dismiss popover when parent view will disappear #93
Comments
I have same issue |
Ever find a solution to this? |
I wonder if this commit in a fork can help resolve this by retaining access to the hosting container: main...chariotsolutions:Popovers:preserve-popover-host#diff-e2a643bfa30cc7d3b75f535698c31a998c099a263a60db12da9ee43c55df1ac6 cc @aheze Could this perhaps be used to force the popover closed inside .onDisappear on the parent view ? edit: I now see that this change is included in this PR: #73 edit: Success! I used that PR plus some other changes to make properties public to retain presentedPopoverContainer in my SwiftUI view that uses popover, then I can dismiss it in onDisappear. Yay. Messy code but maybe there's a way to resolve this within the library itself. edit: The #73 PR is likely irrelevant to my fix, which just requires exposing presentedPopoverContainer as public and capturing it in a PopoverReader. A better solution would be to solve this inside Popovers itself. |
I am using popover in swiftUI project.
When I pop the paged attached popover, showed popover doesn't disappear.
How can I dismiss showed popover?
The text was updated successfully, but these errors were encountered: