| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Can one of the admins verify this patch? |
Sorry, something went wrong.
|
@ddfreiling I don't think it was our intention to provide a different API for View/ViewBase.showModal(...) so I streamlined it with NativeScript/NativeScript#5734. Also, generally there are scenarios where we would like to open a modal view from ViewBase instance (e.g. TabViewItem) but it seems this functionality was not working at the moment -- made a second PR to fix it: NativeScript/NativeScript#5737 Till both PRs are merged and released I would suggest you to replace the snippet // parentView typed as ViewBase, but only View takes stretched param.
if (parentView instanceof View) {
parentView.showModal(page, context, closeCallback, fullscreen, animated, stretched);
} else {
parentView.showModal(page, context, closeCallback, fullscreen, animated);
}with // TODO: remove <any> cast after https://github.com/NativeScript/NativeScript/pull/5734 is merged
(<any>parentView).showModal(page, context, closeCallback, fullscreen, animated, stretched); |
Sorry, something went wrong.
|
@manoldonev updated to use new showModal signature |
Sorry, something went wrong.
|
@ddfreiling can you use the <any> cast above as thou the PRs are merged they are not public yet (no tns-core-modules official releases): // TODO: remove <any> cast after https://github.com/NativeScript/NativeScript/pull/5734 is merged
(<any>parentView).showModal(page, context, closeCallback, fullscreen, animated, stretched); |
Sorry, something went wrong.
showModal with all params has been merged, but awaiting new release of tns-core-modules
…ngular into fix/modal-params
|
test |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Checklist
What is the current behavior?
ModalDialogOptions did not include the new animated and stretched params introduced with Nativescript 4.0
What is the new behavior?
ModalDialogOptions now includes optional animated and stretched params
Fixes #1292
No breaking changes, no migration steps.
Question for reviewer
In dialogs.ts parentView is typed as ViewBase, but in my experience was always a View at runtime, is it safe to cast this instead of checking instanceof?