/ui/elements/confirm
Exports the confirm dialog method as mapp.ui.elements.confirm()
- Source
Requires
Methods
(inner) confirm(params) → {Promise.<boolean>}
This is a confirm element to display information to the user and resolving to yes/no response.
It is a framework alternative way to using window.confirm() browser function.
const confirm = await mapp.ui.elements.confirm({
text: "Please confim changes."
})
if(confirm) {
// proceed
} else {
// prevent
}
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object | Params for the configuration dialog. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params.data_id | string | <optional> | 'confirm' | The data-id attribute value for the dialog. |
params.title | string | <optional> | Text to display in the confirm header. Defaults to 'Confirm'. | |
params.text | string | <optional> | Text to display in the confirm content. |
- Source
Returns:
Returns promise which resolves to true or false whether the question was confirmed.
- Type:
- Promise.<boolean>