action

Overview

To make an object-list clickable, an action tag should be added to the object-list.

Basic Example

main.view.xml
<var name="all_items" type="query:item" />

<object-list query="all_items" label="All Items:" empty-message="There are no items">
    <action on-press="$:selectItem($selection)" />
</object-list>

Standard Attributes

on-press

on-press

validate

Optional

Type: boolean

Default: false

Set to true to ensure that no required input fields in the current view are empty before performing the on-press action.

<action on-press="$:selectItem($selection)" validate="true" />

Advanced Attributes

icon

Optional

Type: string

Default: ion-chevron-right

The icon to display on the button, it will be placed on the left of the label by default. The icon can be a Font Awesome icon or an Ionicons icon.

<action on-press="$:selectItem($selection)" icon="fa-arrow-right" />

Last updated