Problem
After calling Ti.UI.TableView.updateRow(), the click event no longer fires.
Steps to reproduce
Make a project with the below app.js.
Click row 1
#* Notice that the click event fired by seeing the Ti.API.Info message "table row clicked"
Click the 'update row 1' button
Click row 1
#* Notice that the click event does not fire
var win1 = Ti.UI.createWindow({});
var data = [{title:'Row 1'}, {title:'Row 2'}];
var table = Ti.UI.createTableView({data:data});
win1.add(table);
table.addEventListener('click', TableClick);
function TableClick(evt)
{
Ti.API.info('table row clicked');
}
var btn2 = Ti.UI.createButton({
title:'update row 1',
width:120,
height:50,
left:10,
bottom:0
});
btn2.addEventListener('click',DoBtn2Click);
win1.add(btn2);
function DoBtn2Click()
{
table.updateRow(0, table.data[0].rows[0]);
}
win1.open();
Although this seems like a bug, I don't understand why to update row with itself? That makes no sense, but could potentially cause that bug. Try to create new row and then update row at particular index ("update" may not be right word, "replace" IMHO suits better). Also, how did you managed to run iPhone simulator on Windows 7? :)
Ivan, "update" is the terminology used by Appcelerator not me. The updating line updates the row with itself for simplicity. You can change it to update with whatever you want to update it with and it still looses the event among other issues, also reported in a different ticket. Windows 7 was a copy/paste error. I have updated it. Thanks for the catch...however I sure do wish we could use the IOS simulator in Windows!!!!
Shak, this is a critical issue for us. We need to be able to update TableView rows and still see a click event on them.
I've run into this, too. For a small table I was able to delete the rows and re-add them, but this will be a big problem with bigger tables.
Neeraj, I see the priority on this got bumped from Critical to Medium and then to High. Please reconsider the change and please move it back to Critical, which is defined here in JIRA as "Blocks Development" and "Production could not run". I think those terms describe this bug, since click events completely stop working. An app cannot be released like this, and any development work downstream of the updateRow() call is completely stalled. Thanks.
Resolved by PR #1647
Closing bug. Verified fix on: SDK build: 2.0.0.v20120316093247 Titanium Studio, build: 2.0.0.201203152033 Device: iPhone4 (V4.3.5)
Reopening/closing to add/remove labels