[TIMOB-222] Alphabetically filtering support for table views
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T02:25:39.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | iOS |
Labels | feature, ios, iphone |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:25:38.000+0000 |
Updated | 2017-03-02T18:15:55.000+0000 |
Description
Add ability to do alphabetical filtering on table view data.
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.
Changes in codebase have mooted this since then.
Closing as invalid.