| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| /** | ||
| * String value used when hooking to popoverClosed event. | ||
| */ | ||
| public static popoverClosedEvent: string; |
There was a problem hiding this comment.
If this event should be used only internally for the time being when we don't have closing events, it should be private.
Sorry, something went wrong.
There was a problem hiding this comment.
At the moment it is not restricted to only internal use, for example I am using it in the nativescript-angular code to handled its ModalService closing implementation. I was thinking of implementing additional delegate methods of the UIPopoverPresentationControllerDelegate like this popoverPresentationControllerShouldDismissPopover and an related event that the user could handled in order to "dismiss" the closing but it felt like a bigger feature than this fix. I think its better suited for a different PR with that new functionality.
Sorry, something went wrong.
| parentController.dismissViewControllerAnimatedCompletion(animated, whenClosedCallback); | ||
| if (this.viewController.popoverPresentationController && this.viewController.popoverPresentationController instanceof UIPopoverPresentationController) { | ||
| whenClosedCallback(); | ||
| parentController.dismissViewControllerAnimatedCompletion(animated, null); |
There was a problem hiding this comment.
I think this is a breaking change. The closed callback function will be called before the popover modal is closed?
Sorry, something went wrong.
There was a problem hiding this comment.
I do not think so. The actual popover modal has already been closed before hitting the new popoverPresentationControllerDidDismissPopover which calls the _closeModalCallback which finally calls this code.
Sorry, something went wrong.
| false); | ||
| } | ||
|
|
||
| export function onPopoverModal(args: EventData) { |
There was a problem hiding this comment.
Actual test cases that use the test app are added here (by developer) -- https://github.com/NativeScript/NativeScript/tree/master/e2e/modal-navigation/e2e
Sorry, something went wrong.
There was a problem hiding this comment.
Hi @manoldonev ,
I talked with @SvetoslavTsenov to add one after the PR but I could try to implement one myself.
Sorry, something went wrong.
…and handle calling modal `closeCallback` #7050 chore: add example that shows "popover" mode for modal views
|
Closing in favor of new PR to the release branch: #7189 |
Sorry, something went wrong.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Checklist
What is the current behavior?
What is the new behavior?
Fixes/Implements/Closes #[Issue Number].
Fixes #7050
Developer notes
This PR introduces a new event popoverClosed to the View class. This event is raised when a modal using the presentationStyle: UIModalPresentationStyle.Popover is closed by tapping outside of the popup area.