-
-
Notifications
You must be signed in to change notification settings - Fork 241
modal presentationStyle #1709
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
Comments
@dottodot indeed at this moment the feature is available only for NativeScript Core. Marking this one as a feature request. |
@NickIliev OK I'm guessing that not going to happen any time soon. So do you know of any workarounds? I've been trying to use nativescript-popup but when I have a button in the popup that then opens another modal the modal doesn't load correctly. Not sure if it's a problem with the plugin or a limitation of popovers. |
@dottodot I suppose you could do a PR; sounds like a fairly simple problem to solve. |
Yes I'd be happy to do that, the problem is though I don't understand how you would pass in
|
Actually I've realised that part of the problem is the way they have implemented popover in the core modules. Not sure way they didn't make it so it was similar to the fullscreen option as it would make thing much simpler. Such as
So I'm going to do a pull request on that first in the hope it gets accepted, and then it should be a bit easier to update nativescript-angular to work with that. |
Good luck, I haven't looked into it myself. |
OK I have a solution that works probably not exactly right but at least shows it can be done. So I've added 2 new options sourceView and ios
source view allows you to pass in a child view i.e
if the source is present this is used as the
and finally if ios is present
So far I've not found any issues and even allows modals on routes so the action bar can be displayed. I'm sure it's not perfect or exactly how you'd like it but shows it's pretty simple to implement. The only caveat is users will need to include |
Found one issue with the above. I've a button in the popover that opens a second modal. I have this working if I set a timeout. i.e
but if I close the popover by tapping somewhere else on the screen and then open and press the button the app crashes with the error.
|
Maybe we should pass the options as they are received, something like adding Either that or keep adding options to |
Hey, @edusperoni @dottodot seems like you guys are a step away from final implementation. Consider posting a PR if you have a working solution and becoming NativeScript contributors. +1 for this feature from t.1400663 |
OK I've updated my fork with what I've done so far. https://github.com/dottodot/nativescript-angular/tree/modal-options Everything works as it should but think it could do with some refining. I've also added a public
Also a similar thing happens when you click on the background and the popover closes so at the moment if it's a popover I'm first checking to see if any modals are currently open and if so closing them. |
Hi @dottodot , I would be happy to assist you with your first PR into the
|
Closed in #1771 |
Nativescript modals accept extra options for ios i.e presentationStyle
https://github.com/NativeScript/NativeScript/blob/408614dd4595ad8e752bc06334623289053b72a6/tns-core-modules/ui/core/view/view.ios.ts#L413
However when using Angular these options can't be used as the
ModalDialogService
doesn't have any means to pass these options to the modal view.The text was updated successfully, but these errors were encountered: