# RowActionType

> Represents the custom edit action for a ListItem or TableViewRow.

- Source: https://titaniumsdk.com/docs/sdk/12.6.1/RowActionType
- Titanium SDK version: 12.6.1
- Kind: pseudo
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 4.1.0

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](https://titaniumsdk.com/docs/sdk/Titanium.UI.ListView.md)) 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 [canEdit](https://titaniumsdk.com/docs/sdk/Titanium.UI.ListItem.md#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 [editActions](https://titaniumsdk.com/docs/sdk/Titanium.UI.ListItem.md#editActions) property and
[editaction](https://titaniumsdk.com/docs/sdk/Titanium.UI.ListView.md#editaction) event.

*Table Views*:
By default when a TableViewRow has [editable](https://titaniumsdk.com/docs/sdk/Titanium.UI.TableViewRow.md#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 [editActions](https://titaniumsdk.com/docs/sdk/Titanium.UI.TableViewRow.md#editActions) property and
[editaction](https://titaniumsdk.com/docs/sdk/Titanium.UI.TableView.md#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

- Type: String
- Platforms: iPhone, iPad, macOS

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

- Type: String
- Platforms: iPhone, iPad, macOS

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

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 12.1.0

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

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 12.4.0

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

- Type: Number
- Platforms: iPhone, iPad, macOS

The style of the row action.

Use one of [Titanium.UI.iOS.ROW_ACTION_STYLE_DEFAULT](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.md#ROW_ACTION_STYLE_DEFAULT), [Titanium.UI.iOS.ROW_ACTION_STYLE_DESTRUCTIVE](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.md#ROW_ACTION_STYLE_DESTRUCTIVE) or
[Titanium.UI.iOS.ROW_ACTION_STYLE_NORMAL](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.md#ROW_ACTION_STYLE_NORMAL)

### title

- Type: String
- Platforms: iPhone, iPad, macOS

The title of the row action.

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

