Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13206] searchHidden set to true breaks setData() on tableView (3.0.2 Regression)

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2013-03-25T23:40:03.000+0000
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsiOS
Labelsregression
ReporterAlan Leard
AssigneeMax Stepanov
Created2013-03-25T23:10:43.000+0000
Updated2017-03-20T22:19:27.000+0000

Description

Description

If you add a searchBar to a tableView and set searchHidden:true on the tableView, you can not properly setData to the table.

iOS Error Message

2013-03-25 16:07:12.269 testApp[58263:1be03] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2380.17/UITableView.m:909

Simple Sample App

var win = Ti.UI.createWindow();

var searchBar = Ti.UI.createSearchBar();

var table = Ti.UI.createTableView({
    search:searchBar,
    searchHidden:true
});

win.add(table);

populateTable(5);

setInterval(function(){
    var num = Math.floor(Math.random()*8);
    populateTable(num);
}, 5000);

function populateTable(len){
    var rows = [];
    for(var i = 0; i<len; i++){
        var row = Ti.UI.createTableViewRow({title:"Row "+i});
        rows.push(row);
    }
    Ti.API.info("Set Data...");
    table.setData(rows);
    
}

Comments

  1. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source