-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ios-dialogs): unable to show dialog from modal view without a page (
#5881) * fix(ios-dialogs): unable to show dialog from modal view * tests(modal-navigation): add test that opens dialog inside modal view
- Loading branch information
Showing
11 changed files
with
90 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { | ||
onModalNoPage, | ||
onModalFrame, | ||
onModalPage, | ||
onModalLayout, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; | ||
import { NavigatedData, Page } from "tns-core-modules/ui/page"; | ||
import { View, EventData } from "tns-core-modules/ui/core/view"; | ||
import { Frame, ShownModallyData } from "tns-core-modules/ui/frame"; | ||
import { fromObject } from "tns-core-modules/data/observable"; | ||
import { confirm } from "ui/dialogs"; | ||
|
||
export function onLoaded(args) { | ||
console.log("modal-no-page loaded"); | ||
} | ||
|
||
export function closeModal(args: EventData) { | ||
(args.object as View).closeModal(); | ||
} | ||
|
||
export function showDialog(args: EventData) { | ||
let options = { | ||
title: "Dialog", | ||
message: "Message", | ||
okButtonText: "Yes", | ||
cancelButtonText: "No" | ||
|
||
} | ||
|
||
confirm(options).then((result: boolean) => { | ||
console.log(result); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<StackLayout backgroundColor="lightGreen" loaded="onLoaded"> | ||
<Button text="Show Dialog" tap="showDialog"/> | ||
<Button text="Close Modal" tap="closeModal" /> | ||
</StackLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ADjenkov #5841 (review)
any thoughts?