[TIMOB-588] deleting rows with headers via editable:true does not delete header
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.2.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:32:35.000+0000 |
Updated | 2011-04-17T01:53:36.000+0000 |
Description
Base UI => Views => Table View => Delete Mode(3)
Deleting headers from rows via
delete rowobj.header;
also does not delete the header.Possible fix. Now when there are 0 rows in a section, it is removed from the table (which also removes headers, footers, etc.) This may be undesirable because some applications may rely on sections existing even AFTER they are empty, for example, apps which list things alphabetically (which may start with 26 empty sections and just fill them up).
Uncommitted while searching for a better possible solution, and looking into whether or not the
delete
issue can be avoided.(from [baf1546cf7eb200fbe2b98d5cc987a1c45e25cab]) Closes #588: Removes empty sections on row delete. http://github.com/appcelerator/titanium_mobile/commit/baf1546cf7eb200fbe2b98d5cc987a1c45e25cab"> http://github.com/appcelerator/titanium_mobile/commit/baf1546cf7eb2...
Calling
delete row.header
should be considered invalid. Instead, do that and then immediately update the row in the table usingtableView.updateRow()
.Note that now sections are deleted when empty, and so if a section a user wants to exist doesn't (for example, a section indexed by "B") they will need to re-create it when adding in some rows.