FrontendAPIInterface
Properties
list
list:
object
clearFilters()
Clear all filters from the list
Returns
void
closeThreeDotsDropdown()
Close the three dots dropdown
Returns
void
closeUserMenuDropdown()
Close the user menu dropdown
Returns
void
refresh()
Refresh the list
Returns
void
setFilter()
Set a filter in the list Works only when user located on the list page. Can be used to set filter from charts or other components in pageInjections.
Example:
window.adminforth.list.setFilter({field: 'name', operator: 'ilike', value: 'john'})
Parameters
Parameter | Type | Description |
---|---|---|
filter | any | The filter to set |
Returns
void
updateFilter()
Update a filter in the list
Example:
window.adminforth.list.updateFilter({field: 'name', operator: 'ilike', value: 'john'})
Parameters
Parameter | Type | Description |
---|---|---|
filter | any | The filter to update |
Returns
void
Methods
alert()
alert(
params
):void
Show an alert
The alert will be displayed to the user
Example:
window.adminforth.alert({message: 'Hello', variant: 'success'})
Parameters
Parameter | Type | Description |
---|---|---|
params | AlertParams | The parameters of the alert |
Returns
void
confirm()
confirm(
params
):Promise
<void
>
Show a confirmation dialog
The dialog will be displayed to the user
Example:
const isConfirmed = await window.adminforth.confirm({message: 'Are you sure?', yes: 'Yes', no: 'No'})
if (isConfirmed) {
your code...
}
Parameters
Parameter | Type | Description |
---|---|---|
params | ConfirmParams | The parameters of the dialog |
Returns
Promise
<void
>
A promise that resolves when the user confirms the dialog