# RowActionType

Represents the custom edit action for a ListItem or TableViewRow.

Availability
4.1.0
9.2.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Overview

Edit actions can be used to add contextual buttons to your list items / table view rows. The configuration of this API is the same for list items (if you use Titanium.UI.ListView) and table view rows (if you use <Titanium.UI.TableView).

But please note that the trigger to activate these edit actions can defer based on the API you're integrating the edit actions:

List Views: By default when a ListItem has Titanium.UI.ListItem.canEdit set to true, a left swipe on the the row presens the localized 'Delete' button. This object lets developers define custom titles for editing actions supported on the row. This object is used in conjunction with the Titanium.UI.ListItem.editActions property and Titanium.UI.ListView.editaction event.

Table Views: By default when a TableViewRow has Titanium.UI.TableViewRow.editable set to true, a left swipe on the the row presens the localized 'Delete' button. This object lets developers define custom titles for editing actions supported on the row. This object is used in conjunction with the Titanium.UI.TableViewRow.editActions property and Titanium.UI.TableView.editaction event. For table views, this property was added in Titanium SDK 12.4.0.

In addition, the new property "state" was added in 12.4.0 and can either equal "leading" or "trailing" to show them on a right swipe (leading) or left swipe (trailing). If the "state" property is not set, it defaults to "trailing" for backwards compatibility.

# Properties

# color

Availability
4.1.0
9.2.0
color :String

The background color of the row action.

By default the background color of the row action is defined by the style applied. Use this property to override the default background color of the row action.


# identifier

Availability
4.1.0
9.2.0
identifier :String

The [identifier](RowActionType. identifier) of the row action. Only included in the event if previously defined. Available in Titanium 6.0.0 and later.


# image

Availability
12.1.0
12.1.0
image :String

The image/icon of the row action.

You can combine this property with the color property to apply an icon + background color in combination. Note: When using this property, the title property is ignored.


# state

Availability
12.4.0
12.4.0
state :String

The state to show this edit action. Either "trailing" (default) or "leading".

In a LTR layout (e.g English, German), the "leading" state is the left area of the screen and the "trailing" state in the right. In a RTL layout (e.g. Hebrew, Arabic), the "leading" state is the right area of the screen and the "trailing" state in the left.


# style

Availability
4.1.0
9.2.0
style :Number

The style of the row action.


# title

Availability
4.1.0
9.2.0
title :String

The title of the row action.