{ "id": "173972", "key": "TIMOB-27303", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-05-15T18:25:20.000+0000", "created": "2019-08-02T13:48:28.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" }, { "id": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "issuelinks": [ { "id": "57810", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174014", "key": "TIMOB-27335", "fields": { "summary": "Windows: TableView constantly fires scrollend during mouse drag", "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": null, "updated": "2020-05-15T18:25:26.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "Hello!\r\nScroll event attached in Ti.UI.createTableView. After scroll event-triggered then the user wants to refresh table view. While scrolling, the table view shows blank.\r\nThis is happening in Windows 10 app (UWP) but working fine in android/iOS\r\n\r\nTeste project: TestUWP.zip\r\n*Steps to reproduce:*\r\n1. Import attached project.\r\n2. Build with sdk 8.0.2.GA or 7.0.2.GA on Windows 10 uwp apps on Windows Desktop\r\n3. Scroll the table view\r\n4. It showing blank\r\n\r\n{code}\r\nOperating System\r\n Name = Microsoft Windows 10 Pro\r\n Version = 10.0.17134\r\n Architecture = 32bit\r\n # CPUs = 4\r\n Memory = 17091956736\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.0.2.GA\r\n SDK Path = C:\\ProgramData\\Titanium\\mobilesdk\\win32\\8.0.2.GA\r\n Target Platform = windows\r\n{code}\r\n\r\nThanks \r\n\r\n", "attachment": [ { "id": "66799", "filename": "TestUWP.zip", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2019-08-02T13:44:17.000+0000", "size": 101637, "mimeType": "application/zip" } ], "flagged": false, "summary": "Windows: Issue with TableView scrollend event (Windows 10 uwp apps)", "creator": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "subtasks": [], "reporter": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "environment": "Operating System\r\n Name = Microsoft Windows 10 Pro\r\n Version = 10.0.17134\r\n Architecture = 32bit\r\n # CPUs = 4\r\n Memory = 17091956736\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.0.2.GA\r\n SDK Path = C:\\ProgramData\\Titanium\\mobilesdk\\win32\\8.0.2.GA\r\n Target Platform = windows", "closedSprints": [ { "id": 1170, "state": "closed", "name": "2019 Sprint 23", "startDate": "2019-11-04T18:38:14.526Z", "endDate": "2019-11-17T18:38:00.000Z", "completeDate": "2019-11-18T16:38:18.423Z", "originBoardId": 114 }, { "id": 1172, "state": "closed", "name": "2019 Sprint 25", "startDate": "2019-12-02T23:08:39.644Z", "endDate": "2019-12-15T23:08:00.000Z", "completeDate": "2019-12-16T05:54:54.518Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "450492", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "So it turns out the reason why table view shows blank is because UI is too busy rendering the table view. \r\nWe see there are multiple reasons there;\r\n\r\nh2. Updating {{TableView.data}} causes re-creating of _entire_ table view row\r\n\r\nIn the {{scrollend}} event in [^TestUWP.zip] shows that you update {{TableView.data}} property with empty array, and the update with concatenated array like below:\r\n\r\n{code}\r\ntblPartsList.addEventListener('scrollend', function(e){\r\n var cData = generateRamdomArray();\r\n searchedResult = searchedResult.concat(cData);\r\n \t\t\r\n tblPartsList.data = [];\r\n tblPartsList.data = searchedResult;\r\n});\r\n{code}\r\n\r\nHowever, this cause _re-creation of entire table view row_ despite you only want to append new rows. Instead of doing this, following code would be much better because this does not re-create entire table view rows.\r\n\r\n{code}\r\ntblPartsList.addEventListener('scrollend', function(e){\r\n var cData = generateRamdomArray(); \t\t\r\n tblPartsList.appendRow(cData);\r\n});\r\n{code}\r\n\r\nh2. {{scrollend}} is fired too often when you drag scroll bar on Windows desktop\r\n\r\nWe see that Windows desktop TableView fires {{scrollend}} too often when you drag scroll bar. This is because Windows UWP component actually fires the event too often and Titanium is only forwarding the event acoordingly:( FYI this does not happen when you click (not drag) scroll bar arrow button so I would think this is platform component behavior bug but TIMOB-27335 will be taking care of this to try to suppress this.\r\n\r\nh2. Windows TableView is basically heavy weight UI component\r\n\r\nWindows {{TableView}} and {{ListView}} is relatively heavy weight UI component. You might want to check out the https://github.com/appcelerator-modules/ti.xaml.listview - we have much more lightweight module to represent tables - in case you want to push lot more rows to the table.\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-15T04:36:48.000+0000", "updated": "2019-08-15T04:38:09.000+0000" }, { "id": "450813", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1422", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-26T04:11:35.000+0000", "updated": "2019-08-26T04:11:35.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }