{ "id": "176119", "key": "TIMOB-28389", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" }, { "id": "21212", "description": "", "name": "Release 9.3.3", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-05-18T18:13:10.000+0000", "created": "2021-03-12T16:22:02.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TableView", "android", "regression" ], "versions": [ { "id": "21191", "name": "Release 9.3.2", "archived": false, "released": true, "releaseDate": "2021-02-11" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-05-18T18:13:14.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h5.Description\r\n\r\nWhen calling remove in the below code, the {{REQUIRED}} label is not removed as expected.\r\n\r\n*Note*: if the child at index 0 is removed then it will be removed correctly, this appears to be specific to when the child is a Label (wrapping that label in a view also appears to work)\r\n\r\nWorkaround: Wrap the Label in a View\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar rowItems = [];\r\n\r\nfunction formRow(options) {\r\n\tvar pickerRow = Ti.UI.createTableViewRow({\r\n\t\tpickerTitle : options.title,\r\n\t\tbackgroundColor : 'white',\r\n\t\tselectedBackgroundColor : '#E8EFF1',\r\n\t\theight : 50,\r\n\t\tid : options.id\r\n\t});\r\n\r\n\tvar subView = Ti.UI.createView({\r\n\t\tlayout : 'vertical',\r\n\t\theight : Ti.UI.SIZE,\r\n\t\ttouchEnabled : false,\r\n\t\twidth : \"50%\",\r\n\t\tleft : 0\r\n\t});\r\n\r\n\tsubView.add(Ti.UI.createLabel({\r\n\t\ttext : options.title,\r\n\t\tleft : '3%',\r\n\t\tcolor : \"#41515D\",\r\n\t\thorizontalWrap : true,\r\n\t\theight : Ti.UI.SIZE\r\n\t}));\r\n\r\n\tpickerRow.add(subView);\r\n\r\n\tpickerRow.add(Ti.UI.createLabel({\r\n\t\ttext : 'REQUIRED',\r\n\t\tleft : '61%',\r\n\t\tcolor : '#8AA0AE',\r\n\t\thorizontalWrap : true,\r\n\t\twidth : \"40%\",\r\n\t\theight : Ti.UI.SIZE\r\n\t}));\r\n\treturn pickerRow;\r\n\r\n}\r\nvar vegitables = formRow({\r\n\ttitle : 'Vegitables',\r\n\tid : 'Vegitables Type'\r\n});\r\n\r\nvar fruits = formRow({\r\n\ttitle : 'Fruits',\r\n\tid : 'Fruits Type'\r\n});\r\n\r\nvar deserts = formRow({\r\n\ttitle : 'Desserts',\r\n\tid : 'Desserts Type'\r\n});\r\n\r\nrowItems.push(vegitables);\r\nrowItems.push(fruits);\r\nrowItems.push(deserts);\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tdata : rowItems,\r\n\tminRowHeight : 50,\r\n\tseparatorColor : 'red'\r\n});\r\n\r\ntable.addEventListener('click', function(e) {\r\n\tTi.API.info('***** e.row.children BEFORE == ' + e.row.children.length);\r\n\tif (e.row.children[1]) {\r\n\t\te.row.remove(e.row.children[1]);\r\n\t}\r\n\tTi.API.info('***** e.row.children AFTER == ' + e.row.children.length);\r\n});\r\n\r\nwin.add(table);\r\nwin.open(); \r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Add the above code to an existing app.js and build for Android\r\n2. Click a row\r\n\r\nh5.Actual\r\n\r\n{{REQUIRED}} label does not get removed\r\n\r\nh5.Expected \r\n\r\n{{REQUIRED}} label should be removed", "attachment": [], "flagged": false, "summary": "Android: Calling TableViewRow.remove does not remove child view that is a Label", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "closedSprints": [ { "id": 1219, "state": "closed", "name": "2021 Sprint 5", "startDate": "2021-03-01T19:02:00.000Z", "endDate": "2021-03-12T19:02:00.000Z", "completeDate": "2021-03-15T03:30:49.472Z", "originBoardId": 114 }, { "id": 1220, "state": "closed", "name": "2021 Sprint 6", "startDate": "2021-03-15T03:31:12.088Z", "endDate": "2021-03-27T03:31:00.000Z", "completeDate": "2021-03-26T19:18:15.760Z", "originBoardId": 114 }, { "id": 1224, "state": "closed", "name": "2021 Sprint 10", "startDate": "2021-05-17T16:31:32.484Z", "endDate": "2021-05-28T16:31:00.000Z", "completeDate": "2021-05-28T22:15:02.543Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "458398", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12558", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-12T18:10:38.000+0000", "updated": "2021-03-12T18:10:38.000+0000" }, { "id": "458419", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-15T22:12:24.000+0000", "updated": "2021-03-15T22:12:24.000+0000" }, { "id": "458432", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master; 10_0_X for 10.0.0 target; and 9_3_X branch.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-03-16T14:05:30.000+0000", "updated": "2021-03-16T14:05:30.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }