{ "id": "113680", "key": "TIMOB-13737", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-11-07T07:29:10.000+0000", "created": "2013-05-01T22:05:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "30477", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "113642", "key": "ALOY-648", "fields": { "summary": "Allow ListViewAnimationProperties to be passed to functions while data binding", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "28355", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "113642", "key": "ALOY-648", "fields": { "summary": "Allow ListViewAnimationProperties to be passed to functions while data binding", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T21:57:06.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. problem\r\n\r\n[Ti.UI.ListSection.setItems|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListSection-method-setItems] takes a second parameter on iOS that allows you to specify a [ListViewAnimationProperties|http://docs.appcelerator.com/titanium/latest/#!/api/ListViewAnimationProperties] object. In this object one of the properties is *animated*. Setting *animated* to *false* for this parameter should prevent the items from animating down when they are added to the ListView. Despite setting animated to false, the items still animate.\r\n\r\nh2. expected\r\n\r\nListItems will be added but not animated when the 2nd parameter to setItems() is set like this \r\n\r\n{code:javascript}\r\nlistSection.setItems(arrayOfItems, { animated: false });\r\n{code}\r\n\r\nh2. test case \r\n\r\nYou'll notice when running this on iOS that no matter what the value of the object for the second parameter in setItems() the items will still animate down from the top when added.\r\n\r\n{code:javascript}\r\nvar ctr = 0;\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\nvar list = Ti.UI.createListView({\r\n\tsections: [Ti.UI.createListSection()]\t\r\n});\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'click me'\r\n});\r\nbutton.addEventListener('click', function(e) {\r\n\tctr++;\r\n\tvar items = [];\r\n\tfor (var i = 0; i < ctr; i++) {\r\n\t\titems.push({\r\n\t\t\tproperties: { title: ctr + ' rows' }\r\n\t\t});\r\n\t}\r\n\tlist.sections[0].setItems(items, {animated:false});\r\n});\r\n\r\nwin.add(list);\r\nwin.add(button);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "ListSection.setItems() does not respect {animated:false}", "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.1.0\r\niOS 6.1", "comment": { "comments": [ { "id": "313638", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The bug i still present in the latest 3.3 build and prevents from releasing our app. Can someone look up this bug?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-12T16:04:51.000+0000", "updated": "2014-07-12T16:04:51.000+0000" }, { "id": "316774", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Found out, that the Bug only appears, when the section is already added to the listView before the items are applied to it. Simple test case to fix the given workaround:\r\n\r\n{code}\r\nvar ctr = 0;\r\n \r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar list = Ti.UI.createListView();\r\nvar button = Ti.UI.createButton({\r\n title: 'click me'\r\n});\r\nbutton.addEventListener('click', function(e) {\r\n\tvar section = Ti.UI.createListSection();\r\n ctr++;\r\n var items = [];\r\n for (var i = 0; i < ctr; i++) {\r\n items.push({\r\n properties: { title: ctr + ' rows' }\r\n });\r\n }\r\n section.setItems(items, {animated:false});\r\n list.setSections([section]);\r\n});\r\n \r\nwin.add(list);\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\nBut i would still say it is a bug, because the animationProperties should always be considered. :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-08-03T22:46:09.000+0000", "updated": "2014-08-03T22:46:09.000+0000" }, { "id": "400478", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Now it is working properly . It looks , it is fixed in previous builds . It was reported long back . ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-07T07:29:10.000+0000", "updated": "2016-11-07T07:29:10.000+0000" }, { "id": "415805", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T21:57:06.000+0000", "updated": "2017-03-24T21:57:06.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }