Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20074] Add an index identifier to ActionTypes in ListViews to better Identify the action clicked

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, iOS
LabelsCommunity, ListView, regression
ReporterRene Pot
AssigneeUnknown
Created2015-11-02T14:06:19.000+0000
Updated2019-08-24T16:00:07.000+0000

Description

Currently, custom ActionTypes trigger an event, and the action provided with the event is the _Title_ of the ActionType. However, when having more than 1 translation, you would need to compare it to the translation for the ActionType to identify which action has been clicked. There should be a unique parameter that can be passed along. This is also not in line with other elements in Titanium, like dialogs, that return the index of the clicked item, and not the title. It should be the same here Currently:
function actionTypeClickEventHandler(e){
    if (e.action == L('Cancel'){};
}
Should be something like this, which is in line with Dialogs and confirm boxes.
function actionTypeClickEventHandler(e){
    if (e.actionIndex === 0){};
}

Comments

No comments

JSON Source