Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4591] Search icon in filter doesn't show searchbar on tap

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2013-11-11T20:30:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterDoney den Ouden
AssigneeIngo Muschenetz
Created2011-06-09T11:37:38.000+0000
Updated2017-03-20T22:35:47.000+0000

Description

When adding a search icon to the filter/index in a TableView (see screenshot) using title:'{search}' as the title, the searchbar isn't focused (which would be expected behaviour) when tapped. Also, the filter/index should be under the searchbar, not on top of it.
Ti.UI.setBackgroundColor('#000');

var win = Ti.UI.createWindow({
  title:'Tableview with Filter',
  backgroundColor:'#fff'
});

var search = Ti.UI.createSearchBar({
  hintText:'Search',
  showCancel:false
});

var data = [];

for (var c=0;c<=20;c++) {
  data.push({title:"Row "+c});
}

var indexArray = [
  {title:'{search}'},
  {title:'A'},
  {title:'B'},
  {title:'C'},
  {title:'D'},
  {title:'E'},
  {title:'F'},
  {title:'G'},
  {title:'H'},
  {title:'I'},
  {title:'K'},
  {title:'L'},
  {title:'M'},
  {title:'N'},
  {title:'O'},
  {title:'P'},
  {title:'Q'},
  {title:'R'},
  {title:'S'},
  {title:'T'},
  {title:'U'},
  {title:'V'},
  {title:'W'}
];

var tableview = Ti.UI.createTableView({
  search:search,
  data:data,
  index:indexArray
});
win.add(tableview);

win.open();

Attachments

FileDateSize
search.png2011-06-09T11:37:38.000+000048391
Search.zip2011-06-25T04:32:41.000+00001578228

Comments

  1. Paul Dowsett 2011-06-13

    In order for us to progress this issue, please edit your ticket to include a proper [Use-case](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases). State your environment, including whether you have tested on device or simulator, Titanium SDK version + build date + commit hash, and the iOS version. Also kindly read the [Submitting Bug Reports](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-SubmittingBugReports) guide before raising tickets. Thank you
  2. Paul Dowsett 2011-06-25

    No response from user
  3. Doney den Ouden 2011-06-25

    Excuse me for replying so late, in all honesty I forgot to reply. Added more info and a test case. I'm not sure about committing the hash you asked for.
  4. Paul Dowsett 2011-07-05

    Doney Would you please state where you have seen an official example of the index property used in this way? If it's a valid use, then we need to know in order to get it documented. Once we have established that, we can take this further. Thanks
  5. Paul Dowsett 2011-07-05

    btw, please don't attach a whole project for such a simple usecase. A simple code block will suffice. Thanks
  6. Doney den Ouden 2011-07-05

    Here is an example of official use. Apple uses it in first party apps like the Contacts and iPod apps: http://cl.ly/2H2g0D2U2s0k3u24460p
  7. Paul Dowsett 2011-07-05

    Doney OK, but bear in mind that not all Apple features are necessarily supported by Titanium, although our aim is to get close to total coverage. One member of our team, Pedro, has actually done some work on this, after discovering a problem with the function himself. See his fixed [TiUITableView.m](https://gist.github.com/fcee08050552fe9a7017) file, where lines 1798 to 1802 of the original have been modified. Pedro suggests testing it with [this usecase](https://gist.github.com/912054). Moving this ticket to TIMOB project to action fix.
  8. Paul Dowsett 2011-07-05

    Note that a request to add information to the APIDocs about the index function has been made at TIMOB-4592
  9. Pedro Enrique 2013-11-11

  10. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source