Documentation

showDialogAsync()

Shows a dialog activity, and returns a promise that resolves when the dialog is closed.

showDialogAsync<T extends Activity>(dialog: T): Promise<T>;

Parameters

Return value

A promise that resolves with the dialog activity after it has been unlinked

Description

This method activates the provided activity as a dialog, and resolves the returned promise when the dialog activity is unlinked (either by itself, e.g. when the user confirms or cancels, or when the parent activity is deactivated).

Examples

// Show a dialog and handle the result
let dialog = await this.showDialogAsync(new MyDialogActivity());
if (dialog.result) {
  // ... handle result
}

Related