[TIMOB-1029] Ability to instantly clear all rows from a tableview

GitHub Issuen/a
Resolution Date2011-04-15T02:41:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ReporterMatthew Lieder
AssigneeReggie Seagraves


I'm using a TableView to show a list of settings in my app, similar to Settings in the iPhone OS, and the easiest way to update the table after a setting has been changed is to re-add all the rows. The problem is, when I remove the rows using setData([]), it takes up half a second or so showing an unnecessary animation of all the rows being removed! When all I want is for the data to seamlessly be updated, that's an unacceptable user experience. It has to be really simple to get rid of that animation, but from my searching and experimenting so far it seems like it actually surprisingly might not be possible with the current state of the API (see http://developer.appcelerator.com/question/1271/how-to-set-data-to-a-table-view-without-animation"> http://developer.appcelerator.com/question/1271/how-to-set-data-to-... and the "invalid" issue 815).

Could this please be added ASAP?


  1. Jeff Haynie 2011-04-15

    calling setData without a secondary parameter will cause the data to be loaded with animation by default.

    you have two options:

    1/ Call tableview.data = []

    this is w/o animation by default.

    2/ Call tableview.setData(data,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.NONE})

    this will turn off animation too

    I updated KS to add a test case to show this explicitly.

    Also, in 1.4, you will be able to just pass a null too. For now, you'll have to pass empty array.

  2. Matthew Lieder 2011-04-15

    Thanks for your help; my problem turned out to be that one of my apps still was using the 1.2.0 API :(. Works great now!

  3. Lee Morris 2017-03-09 Closing ticket as invalid.

JSON Source