[TIMOB-11688] iOS: TableView - Click on chosen row returns all table view rows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-11-08T19:19:22.000+0000 |
Affected Version/s | Release 2.1.4 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity, qe-ios214 |
Reporter | Tamila Smolich |
Assignee | Vishal Duggal |
Created | 2012-11-07T18:33:21.000+0000 |
Updated | 2017-03-22T20:53:33.000+0000 |
Description
Description:
Click on chosen row returns all table view rows back on iOS. Works fine on Android.
This is not a regression, the behavior occurs as far back as 2.1.2 at least.
Steps:
1. Run the following code:
var tabGroup = Ti.UI.createTabGroup();
var win = Ti.UI.createWindow({});
var tab = Ti.UI.createTab({
title: 'Table Test',
window: win
});
var data = [
{title: 'First Row', hasDetail: true},
{title: 'Second Row', hasDetail: true},
{title: 'Third Row', hasDetail: true},
{title: 'Forth Row', hasDetail: true},
{title: 'Fifth Row', hasDetail: true}
];
var search = Ti.UI.createSearchBar({
returnKeyType: Ti.UI.RETURNKEY_DONE
});
var tableView = Ti.UI.createTableView({
data: data,
search: search
});
tableView.addEventListener('click', function (e) {
alert('Click Event. index: ' + e.index + ', Title: ' + e.row.title);
});
win.add(tableView);
tabGroup.addTab(tab);
tabGroup.open();
2. Search for any row (e.g. Third)
3. Click on chosen row to get an alert with index and title
Expected result:
Only chosen row should be seen in table view
Actual result:
All rows return back on table view
There is a flag that would turn the behavior on and off, so marking it as invalid. Vishal, could you help fill in the particular flag? Thanks.
Look at hideSearchOnSelection http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-property-hideSearchOnSelection
Closing ticket as invalid with reference to the above comments.