{ "id": "62021", "key": "TIMOB-1389", "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": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "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": "2013-05-06T08:42:34.000+0000", "created": "2011-04-15T02:51:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "review" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:03:18.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": "{html}

It's quite easy to add rows to an existing TableView\r\n(tableview.appendRow(row)), however it just adds rows to the\r\nabsolute bottom of the table and not to the bottom of the section.\r\nI can use insertRowBefore/After to add rows to existing sections,\r\nbut it obviously doesn't work if all the rows have been deleted\r\nfrom the section. Closest I've gotten to finding a solution is\r\nsection.add(row), but that doesn't update the UI and even when I do\r\nforce the UI to update (by changing an attribute on the section\r\nobject) weird UI glitches appear.

\r\n

Basically what I need is something like\r\nTableView.appendRowToSection(row, section), or\r\nTableViewSection.add(row) to be fixed to work when the tableview's\r\nalready been rendered.

\r\n

Use case is toggling display of rows inside a section; I'm\r\nwanting the user to be able to collapse/expand sections just by\r\ntapping the section header.

\r\n

Helpdesk reference: http://developer.appcelerator.com/helpdesk/view/31021

\r\n

I've also attached some code that demonstrates what I'm\r\nattempting and the problems I'm experiencing. It should drop right\r\ninto the Kitchen Sink app. To reproduce the section.add UI\r\nglitches, collapsing and then expand (by clicking it) the bottom\r\nheader, then the middle header, then the top header. Notice how the\r\nlower headers seem to reproduce, with one staying in place and the\r\nother moving up.

{html}", "attachment": [ { "id": "17979", "filename": "table_view_collapsing_headers.js", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:51:08.000+0000", "size": 3928, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: Add ability to dynamically add rows to TableView sections", "creator": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125545", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Fits under the tableview umbrella, still a bug. What a nice\ntest, too!

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:51:09.000+0000", "updated": "2011-04-15T02:51:09.000+0000" }, { "id": "209346", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still valid SDK 2.2.0.f9e938d.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-25T11:43:46.000+0000", "updated": "2012-07-25T11:43:46.000+0000" }, { "id": "214490", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested on the iOS simulator using TiSDK 2.2.0v20120814103312, issue still exists.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-14T16:48:40.000+0000", "updated": "2012-08-14T16:48:40.000+0000" }, { "id": "218787", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Come on guys, nowadays dynamic scrolling in tables is a much. Not being able to do this with sectioned tabled is not an option! Raise the priority please!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-09-13T05:05:00.000+0000", "updated": "2012-09-13T05:05:00.000+0000" }, { "id": "224481", "author": { "name": "sundar", "key": "sundar", "displayName": "sundara nataraj", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you....you did nice job", "updateAuthor": { "name": "sundar", "key": "sundar", "displayName": "sundara nataraj", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-19T17:39:20.000+0000", "updated": "2012-10-19T17:39:20.000+0000" }, { "id": "224628", "author": { "name": "sundar", "key": "sundar", "displayName": "sundara nataraj", "active": true, "timeZone": "America/Los_Angeles" }, "body": "hi ... let there are 100 rows in each section .. so i want show only few ...at start when he click header total should show...\r\nwhen i implement ..it is not working ..please check that", "updateAuthor": { "name": "sundar", "key": "sundar", "displayName": "sundara nataraj", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-22T12:23:03.000+0000", "updated": "2012-10-22T12:23:03.000+0000" }, { "id": "250281", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces , It is able to collapse/expand sections just by tapping the section header.\r\n\r\nTested with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\niOS iPhone Simulator: iOS SDK version: 6.0\r\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-06T08:41:45.000+0000", "updated": "2013-05-06T08:41:45.000+0000" }, { "id": "414525", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:03:18.000+0000", "updated": "2017-03-21T22:03:18.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }