[TIMOB-1389] iOS: Add ability to dynamically add rows to TableView sections
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-05-06T08:42:34.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2013 Sprint 09 |
Components | iOS |
Labels | api, review |
Reporter | Matthew Lieder |
Assignee | Shameer Jan |
Created | 2011-04-15T02:51:08.000+0000 |
Updated | 2017-03-21T22:03:18.000+0000 |
Description
It's quite easy to add rows to an existing TableView (tableview.appendRow(row)), however it just adds rows to the absolute bottom of the table and not to the bottom of the section. I can use insertRowBefore/After to add rows to existing sections, but it obviously doesn't work if all the rows have been deleted from the section. Closest I've gotten to finding a solution is section.add(row), but that doesn't update the UI and even when I do force the UI to update (by changing an attribute on the section object) weird UI glitches appear.
Basically what I need is something like TableView.appendRowToSection(row, section), or TableViewSection.add(row) to be fixed to work when the tableview's already been rendered.
Use case is toggling display of rows inside a section; I'm wanting the user to be able to collapse/expand sections just by tapping the section header.
Helpdesk reference: http://developer.appcelerator.com/helpdesk/view/31021">http://developer.appcelerator.com/helpdesk/view/31021
I've also attached some code that demonstrates what I'm attempting and the problems I'm experiencing. It should drop right into the Kitchen Sink app. To reproduce the section.add UI glitches, collapsing and then expand (by clicking it) the bottom header, then the middle header, then the top header. Notice how the lower headers seem to reproduce, with one staying in place and the other moving up.
Attachments
File | Date | Size |
---|---|---|
table_view_collapsing_headers.js | 2011-04-15T02:51:08.000+0000 | 3928 |
Fits under the tableview umbrella, still a bug. What a nice test, too!
Still valid SDK 2.2.0.f9e938d.
Tested on the iOS simulator using TiSDK 2.2.0v20120814103312, issue still exists.
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!
Thank you....you did nice job
hi ... let there are 100 rows in each section .. so i want show only few ...at start when he click header total should show... when i implement ..it is not working ..please check that
Issue does not reproduces , It is able to collapse/expand sections just by tapping the section header. Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced and due to the above comments.