{ "id": "131493", "key": "TIMOB-17097", "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": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-27T09:55:02.000+0000", "created": "2014-06-10T00:56:57.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableview", "qe-manualtest" ], "versions": [], "issuelinks": [ { "id": "38252", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "131171", "key": "AC-1397", "fields": { "summary": "iOS: Rendering issue when deleting and re-adding row", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-27T09:55:02.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": "There's one issue when row is being deleted and then re added.\r\n\r\n{code}\r\nTi.UI.setBackgroundColor(\"#fff\");\r\n \r\nvar win = Ti.UI.createWindow({\r\n top: 20,\r\n backgroundColor: \"#ccc\"\r\n});\r\n \r\nvar table = Ti.UI.createTableView({\r\n top: 0,\r\n bottom: 0\r\n});\r\n\r\nvar tableData = [];\r\n \r\nfor (var i = 0; i < 10; i++) {\r\n tableData.push(Ti.UI.createTableViewRow({\r\n title: \"Row \" + (i + 1)\r\n }));\r\n}\r\n\r\ntable.setData(tableData);\r\n\r\nwin.add(table);\r\n \r\n//var newSection;\r\ntable.addEventListener(\"click\", function(e) {\r\n \r\n var row = table.data[0].rows[e.index];\r\n \r\n Ti.API.info('index');\r\n Ti.API.info(e.index);\r\n Ti.API.info(row.title);\r\n \r\n table.deleteRow(row);\r\n //Ti.API.info('delete an row');\r\n table.insertRowBefore(0, row); \r\n //Ti.API.info('add an row');\r\n /*setTimeout(function() {\r\n table.insertRowBefore(0, row);\r\n }, 2); */\r\n \r\n});\r\n \r\nwin.open();\r\n{code}\r\n\r\nBase on the above code, the behave of delete and insert row will not work well. I think it is because when we do the delete action, the device page will still not refresh well, then the second action will not work properly. ", "attachment": [ { "id": "48914", "filename": "Acutal.png", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-13T00:19:38.000+0000", "size": 51158, "mimeType": "image/png" }, { "id": "48915", "filename": "Expect.png", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-13T00:19:38.000+0000", "size": 58288, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Rendering issue when deleting and re-adding row", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "TiSDK 3.3.0.Beta, 3.2.3.GA\r\niOS 7.1\r\nTi CLI 3.3.0-beta\r\nOSX 10.9.2\r\nXCode 5.1", "comment": { "comments": [ { "id": "308207", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Properly need a new tableview.refresh API. \r\nBecause every time make change to table view, has to be refreshed before make the next move.", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-10T06:19:04.000+0000", "updated": "2014-06-10T06:19:04.000+0000" }, { "id": "308208", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-10T06:21:55.000+0000", "updated": "2014-06-10T06:21:55.000+0000" }, { "id": "308804", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Oh, Ok. When you run the above code. and click the row 5.\r\n\r\nActual result:\r\nAttachment 1\r\n\r\nExpect result:\r\nAttachment 2", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-13T00:17:37.000+0000", "updated": "2014-06-13T00:17:37.000+0000" }, { "id": "320301", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces on SDK Version 3.3.0\r\nBut can't reproduce on SDK 3.4.0\r\n\r\nTitanium Command-Line Interface, \r\nCLI version 3.3.0, \r\nTitanium SDK version 3.3.0 GA \r\nTitanium SDK version 3.4.0.GA \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\niOS SDK: 7.1 \r\niOS iPhone Simulator: 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-26T06:39:37.000+0000", "updated": "2014-08-26T06:39:37.000+0000" }, { "id": "320546", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tableview rows are in expected order after deleting and inserting a row.\r\n\r\nVerified on:\r\nAppC Studio: 3.4.0.201408251831\r\nSDK: 3.4.0.v20140826143313\r\nCLI: 3.4.0-dev\r\nAlloy: 1.5.0-dev\r\nXcode: Xcode6-beta6\r\niOS Device: iPhone 4(v7.1), iPad4(v8.0 beta)\r\n", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-27T09:22:49.000+0000", "updated": "2014-08-27T09:22:49.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }