Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-222] Alphabetically filtering support for table views

GitHub Issuen/a
Resolution Date2011-04-15T02:25:39.000+0000
Affected Version/sn/a
Fix Version/sBacklog
Labelsfeature, ios, iphone
ReporterNolan Wright
AssigneeBlain Hamon


Add ability to do alphabetical filtering on table view data.


  1. Blain Hamon 2011-04-15

    It would be possible to do sorting based on a supplied key(s) (IE, a tableView with {sortBy:['lastName','firstName']} would sort all cells based on their contents, sorted by last name, and where last names match, sort by first names)

    However, there is some issues that will need resolving.

    For TableView, the indexes matter, especially for inserting and deleting, and sorting this would destroy the index order.

    For TableView, the javascript data and native data needs to match, especially if we are to care about indexes and the like. This means either doing the sorting on the javascript side, or transferring the sorted data from native back into javascript. Both of these are expensive.

    For TableView, the headers are part of the data cell, and the order of the data cells is important for the header order.

    Possible solutions:

    1) Provide javascript-side functions that do the sorting and header generation, essentially mooting differences.

    2) Subclass akin to grouped view, called SortedTableView. SetData is order agnostic (Since it's set by the sorting algorithm) and inserts have no index. Delete is done by passing a matching filter to delete (Ie, all data cells whose key-value pairs match the ones provided are deleted). Headers on data cells are ignored and are generated based on the letter of the first sorting key.

  2. Blain Hamon 2011-04-15

    Changes in codebase have mooted this since then.

  3. Lee Morris 2017-03-02

    Closing as invalid.

JSON Source