While re-setting the table content with setData() method the labels that are inside the rows start jittering.
1. Run the sample code
2. Press the "Tap this row" row
var win = Ti.UI.createWindow();
var labelsLeft = ["Label","Tap this row", "Single journey", "Label", "Label", "Label", "Label"];
var labelsRight = ["One","Yes", "No", "N/A", "N/A", "N/A", "N/A"];
var rowsHeader = [true,false,true,false,true,false,false];
var data = [];
for(var i=0; i<labelsLeft.length; i++) {
var lbl = Ti.UI.createLabel({top:0, left:0, width: 'auto', height:50, text: labelsLeft[i]});
var lbl2 = Ti.UI.createLabel({top:0,right: 70, width: 'auto', height:50, text: labelsRight[i]});
if(rowsHeader[i]) var row = Titanium.UI.createTableViewRow({header: ''});
else var row = Titanium.UI.createTableViewRow();
row.height = 'auto';
row.add(lbl);
row.add(lbl2);
data.push(row);
}
var table = Titanium.UI.createTableView({top:0, style: Ti.UI.iPhone.TableViewStyle.GROUPED, data:data});
data[1].addEventListener("click",function(e){
if(labelsRight[2]=="No") labelsRight[2]="Yes";
else labelsRight[2]="No";
var lbl = Ti.UI.createLabel({top:0, left:0, width: 'auto', height:50, text: labelsLeft[2]});
var lbl2 = Ti.UI.createLabel({top:0,right: 70, width: 'auto', height:50, text: labelsRight[2]});
if(rowsHeader[2]) var row = Titanium.UI.createTableViewRow({header: ''});
else var row = Titanium.UI.createTableViewRow();
row.height = 'auto';
row.add(lbl);
row.add(lbl2);
data[2] = row;
table.setData(data);
});
win.add(table);
win.open();
This is resolved by the fix for TIMOB-5441, and should be processed along with it. Time is logged against that ticket, aside from the test to confirm.
Verified fix with 1.8.0.1.v20111122105459 on an iPod 4.3.3.