Affects Version/s: None
Component/s: Titanium SDK & CLI
Titanium Studio, Titanium SDK 2.1.0.GA and 2.1.1.GA, Android 2.3.3 and 4.0 on emulator and devices
When building a tableview based on existing data, the table eventlistener 'click' does not return the correct index value for the row clicked on. Instead it returns the index value of the last item in the list.
This issue can be fixed by removing the 'className' from the tableviewrow definition. Additionally it can be fixed by removing 'height: Ti.UI.SIZE' from the tableview definition.
It seems that these two options used at the same time in a table break the click function.
One last thing, if you force the view to redraw, by switching orientation for example, after the redraw the index value returned from the
click event is correct.
Here is a link to some extensive testing from the Q&A forum: http://developer.appcelerator.com/question/140856/removing-a-tableviewrow-works-on-ios-but-not-android
Here is code to reproduce the issue: