{ "id": "131171", "key": "AC-1397", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-06-16T21:36:10.000+0000", "created": "2014-06-03T10:07:27.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "38252", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "131493", "key": "TIMOB-17097", "fields": { "summary": "iOS: Rendering issue when deleting and re-adding row", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updated": "2016-03-08T07:37:49.000+0000", "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" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "There's one issue when row is being deleted and then re added.\r\n\r\nTo see this issue, run this code:\r\n\r\n{code}\r\nTi.UI.setBackgroundColor(\"#fff\")\r\n\r\nvar win = Ti.UI.createWindow({\r\n\ttop: 20,\r\n\tbackgroundColor: \"#ccc\"\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop: 0,\r\n\tbottom: 0\r\n});\r\n\r\nvar section = Ti.UI.createTableViewSection({\r\n\theaderView: Ti.UI.createLabel({ text: \"Section\" })\r\n});\r\n\r\nfor (var i = 0; i < 10; i++) {\r\n\tsection.add(Ti.UI.createTableViewRow({\r\n\t\ttitle: \"Row \" + (i + 1)\r\n\t}));\r\n}\r\n\r\ntable.setData([ section ]);\r\n\r\nvar newSection;\r\ntable.addEventListener(\"click\", function(e) {\r\n\r\n\tvar row = table.data[0].rows[e.index];\r\n\r\n\tTi.API.info('index');\r\n\tTi.API.info(e.index);\r\n\tTi.API.info(row.title);\r\n\r\n\ttable.deleteRow(row);\r\n\ttable.insertRowBefore(0, row);\r\n\t/*setTimeout(function() {\r\n\t\ttable.insertRowBefore(0, row);\r\n\t}, 3000);*/\r\n\r\n});\r\n\r\nwin.add(table);\r\n\r\nwin.open();\r\n{code}\r\n\r\nBasically, this code moves clicked row to first position in table.\r\n\r\nSo, for example, you can click on \"Row 2\" and it should move before \"Row 1\".\r\n\r\nThe problem is that's not what happens. For some reason, there are two \"Row 2\".\r\n\r\nYou can click again on second row, and everything resets.\r\n\r\n\r\nCheck the logs, seems to be okay there, just the rendering in not correct.\r\n\r\n\r\n\r\nIf timeout is introduced for row re addign (like in commented part), everything will work fine.", "attachment": [], "flagged": false, "summary": "iOS: Rendering issue when deleting and re-adding row", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* TiSDK 3.3.0.Beta, 3.2.3.GA\r\n* iOS 7.1\r\n* Ti CLI 3.3.0-beta\r\n* OSX 10.9.2\r\n* XCode 5.1", "comment": { "comments": [ { "id": "307975", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nThis is a refresh issue. After you delete a row, the page still not refresh, so second action \"insertRow\" will not work well. \r\n\r\nI will talk to our engineer team to figure it out whether is it a bug, and keep you up to date. \r\nFor now, if you really need it shortly, you can add one more action between \"delete\" action and \"insert\" action, like do a timeout or Ti.API.info();\r\n\r\nRegards,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-09T07:40:55.000+0000", "updated": "2014-06-09T07:40:55.000+0000" }, { "id": "307984", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I did a timeout, I said that, there's commented part with \"setTimeout\".\r\n\r\n\r\nI don't understand how can this not be a bug, it's not a feature for sure :D", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-06-09T09:11:59.000+0000", "updated": "2014-06-09T09:11:59.000+0000" }, { "id": "308160", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Filed a ticket to engineer team already. ", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-10T00:57:58.000+0000", "updated": "2014-06-10T00:57:58.000+0000" }, { "id": "308215", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Great, thank you.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-06-10T07:50:02.000+0000", "updated": "2014-06-10T07:50:02.000+0000" }, { "id": "309210", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2014-06-16T21:36:10.000+0000", "updated": "2014-06-16T21:36:10.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }