Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1191] Ios app crash after search in tableview using searchbar

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-28T16:07:33.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Studio
Labelsalloy, filter, ios, searchbar, tableview
Reporterabada henno
AssigneeShak Hossain
Created2014-11-09T10:47:09.000+0000
Updated2016-03-08T07:37:34.000+0000

Description

When try search using SearchBar in TableView and click on any row result the app will crashes !

Attachments

FileDateSize
example.zip2014-11-09T10:47:09.000+00003571

Comments

  1. Amimul Hossain 2015-09-01

    Hello, I have tested this issue, search is working fine in tableview with searchbar, This is not a valid bug.

    Environment

    CLI 4.1.2 SDK 4.1.0.GA iOS 8.3

    Code

       var win = Titanium.UI.createWindow({
       	fullscreen : false
       });
       
       var data = [];
       
       data[0] = Ti.UI.createTableViewRow({
       	title : 'John AppleSeed',
       	id : '100'
       });
       data[1] = Ti.UI.createTableViewRow({
       	title : 'John',
       	id : '101'
       });
       data[2] = Ti.UI.createTableViewRow({
       	title : 'Mark',
       	id : '102'
       });
       data[3] = Ti.UI.createTableViewRow({
       	title : 'Paul',
       	id : '103'
       });
       
       var search = Titanium.UI.createSearchBar({
       
       	showCancel : false,
       	hintText : 'Search Customer'
       });
       
       search.addEventListener('change', function(e) {
       	e.value; // search string as user types
       });
       search.addEventListener('return', function(e) {
       	search.blur();
       });
       search.addEventListener('cancel', function(e) {
       	search.blur();
       });
       
       // create table view
       var tableview = Titanium.UI.createTableView({
       	data : data,
       	search : search
       
       });
       
       // add table view to the window
       win.add(tableview);
       
       win.open();
       
    Hope this helps, Thanks.

JSON Source