Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11688] iOS: TableView - Click on chosen row returns all table view rows

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2012-11-08T19:19:22.000+0000
Affected Version/sRelease 2.1.4
Fix Version/sn/a
ComponentsiOS
Labelsparity, qe-ios214
ReporterTamila Smolich
AssigneeVishal Duggal
Created2012-11-07T18:33:21.000+0000
Updated2017-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

Comments

  1. Michael Xia 2012-11-08

    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.
  2. Vishal Duggal 2012-11-08

    Look at hideSearchOnSelection http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-property-hideSearchOnSelection
  3. Lee Morris 2017-03-22

    Closing ticket as invalid with reference to the above comments.

JSON Source