Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25373] iOS: Search result view of List did not close when widow containing list view get closed.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-10-11T21:12:07.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sRelease 6.3.0
Componentsn/a
Labelscommunity, ios
ReporterVijay Singh
AssigneeVijay Singh
Created2017-10-06T08:13:30.000+0000
Updated2017-10-11T23:04:21.000+0000

Description

Open window containing list view with searchbar. Start searching . click any search item and close window in callback of item click. Search view remains. Test Case-
var win1 = Titanium.UI.createWindow({
    backgroundColor: 'red',
    title: 'Red Window',
});
 
var win2 = Titanium.UI.createWindow({
});
 
 var button = Titanium.UI.createButton({
    title: 'Open List Window',
});
var rows = [];
for (var i = 0; i < 5; i++) {
    rows.push({ properties: { title: 'Row '+ i , backgroundColor: 'red', searchableText:'Row '+i}});
}

var sb = Ti.UI.createSearchBar();
var ls = Ti.UI.createListSection({
  items: rows
});
 
 var lv = Ti.UI.createListView({
    top : 0,
    sections: [ls],
    searchView: sb,
});

sb.addEventListener('return', function(e){
  sb.blur();
});
lv.addEventListener('itemclick', function(e) {
    Ti.API.info('click at index: ' + e.itemIndex);
    win2.close();
}); 
win2.add(lv);

button.addEventListener('click', function(){
  win2.open();
});
 
win1.add(button);
win1.open();

Comments

  1. Vijay Singh 2017-10-09

    PR (master) - https://github.com/appcelerator/titanium_mobile/pull/9508 PR (6_3_X) - https://github.com/appcelerator/titanium_mobile/pull/9509 Test Case -
       var rows = [];
       for (var i = 0; i < 20; i++) {
           rows.push({ title: 'Row '+ i});
       }
        
        
       var win = Ti.UI.createWindow({
         backgroundColor: '#ffffff',
       });
       
        var button = Titanium.UI.createButton({
           title: 'Open TableView Window',
       });
       
       win.add(button);
        
       var win2 = Titanium.UI.createWindow({
       });
        
       var sb = Ti.UI.createSearchBar();
        
       var lv = Ti.UI.createTableView({
           hideSearchOnSelection: false,
           data: rows,
           search: sb,
       });
        sb.setHintText("test");
         
       win2.add(lv);
       
       lv.addEventListener('click', function(e) {
           Ti.API.info('click at index: ' + e.index); 
           win2.close();
       })
        
        button.addEventListener('click', function(){
         win2.open();
       });
       
       win.open();
       
  2. Eric Wieber 2017-10-11

    FR Passed. Able to perform a search and close the containing view without the search results remaining. Tested using the provided case as well as the searchbar suite
  3. Eric Wieber 2017-10-11

    Verified in SDK builds 6.3.0.v20171011142527 & 7.0.0.v20171011150724

JSON Source