{ "id": "129546", "key": "TIMOB-16872", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-04-22T13:45:04.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "usability", "ux" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:11.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. description\r\n\r\n{{Ti.UI.TableView}} has a number of functions that add or remove rows. Those functions take a parameter that allows you to specify an animation for these operations. All of the functions will perform an animation by default, which the exception of [appendRow()|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-method-appendRow]. I think {{appendRow()}} should default to having an animation, just like all the other functions.\r\n\r\nh2. expected\r\n\r\n[Ti.UI.TableView.appendRow()|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-method-appendRow] should be animated by default.\r\n\r\nh2. actual\r\n\r\n[Ti.UI.TableView.appendRow()|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-method-appendRow] is not animated by default.\r\n\r\nh2. test case\r\n\r\nThe test case here shows that while {{insertRowBefore()}} and {{deleteRow()}} are animated by default, {{appendRow()}} is not.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\n\r\n// create table with some filler rows\r\nvar table = Ti.UI.createTableView({\r\n\ttop: 0,\r\n\tbottom: 50\r\n});\r\nvar rows = [];\r\nfor (var i = 0; i < 3; i++) {\r\n\trows.push({ title: 'title ' + (i+1) });\r\n}\r\ntable.setData(rows);\r\n\r\n// create tabbedbar for appending, inserting, and deleting\r\nvar tabbed = Ti.UI.createTabbedBar({\r\n\theight: 50,\r\n\tbottom: 0,\r\n\tlabels: ['append', 'insert', 'delete']\r\n});\r\ntabbed.addEventListener('click', function(e) {\r\n\tswitch(e.index) {\r\n\t\tcase 0:\r\n\t\t\ttable.appendRow({ title: 'append' });\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\ttable.insertRowBefore(0, { title: 'insert' });\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\ttable.deleteRow(table.sections[0].rows[0]);\r\n\t\t\tbreak;\r\n\t}\r\n});\r\n\r\nwin.add(tabbed);\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Titanium.appendRow() should be animated by default", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.2.2\r\niOS 7.1", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }