title | apiRef | contributors | |||
---|---|---|---|---|---|
ActionDialog |
|
The action()
method shows a list of selectable options and a cancellation button. Use it to let the user choose between options or dismiss the selection.
The method is part of the dialogs
module.
The action()
method is available globally. You can call it anywhere in your app.
import { action } from '@nativescript/core/ui/dialogs'
action("Your message", "Cancel button text", ["Option1", "Option2"])
.then(result => {
console.log(result);
});
[> screenshots for=ActionDialog <]