Skip to content

Commit 33eac9d

Browse files
author
farfromrefug
committed
fix(dialogs): allow custom view to be added to prompt/login (for now under the text fields)
1 parent 51ebc6c commit 33eac9d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/dialogs/dialogs.android.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ export function prompt(arg: any): Promise<PromptResult> {
459459
}
460460
}
461461
stackLayout.addChild(textField);
462+
if (options.view instanceof View) {
463+
stackLayout.addChild(options.view);
464+
}
462465
options.view = stackLayout;
463466
const alert = createAlertDialogBuilder(options);
464467

@@ -532,6 +535,10 @@ export function login(arg: any): Promise<LoginResult> {
532535

533536
stackLayout.addChild(userNameTextField);
534537
stackLayout.addChild(passwordTextField);
538+
539+
if (options.view instanceof View) {
540+
stackLayout.addChild(options.view);
541+
}
535542
options.view = stackLayout;
536543

537544
const alert = createAlertDialogBuilder(options);

src/dialogs/dialogs.ios.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ export function prompt(arg: any): Promise<PromptResult> {
413413
}
414414
}
415415
stackLayout.addChild(textField);
416+
if (options.view instanceof View) {
417+
stackLayout.addChild(options.view);
418+
}
416419
options.view = stackLayout;
417420

418421
const alertController = createAlertController(options, resolve);
@@ -486,6 +489,9 @@ export function login(arg: any): Promise<LoginResult> {
486489

487490
stackLayout.addChild(userNameTextField);
488491
stackLayout.addChild(passwordTextField);
492+
if (options.view instanceof View) {
493+
stackLayout.addChild(options.view);
494+
}
489495
options.view = stackLayout;
490496
const alertController = createAlertController(options, resolve);
491497

0 commit comments

Comments
 (0)