Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4134] iOS - rowHeight on tableView not working if data is empty

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-01-04T11:07:33.000+0000
Affected Version/sRelease 1.5.0, Release 1.7.0, Release 1.6.2
Fix Version/sRelease 1.4.0, Sprint 2011-49, Release 1.8.0.1
ComponentsiOS
Labelsmerge-1.8.0, module_tableview, qe-testadded, regression
ReporterPedro Enrique
AssigneeBlain Hamon
Created2011-05-18T13:00:58.000+0000
Updated2013-12-10T06:10:00.000+0000

Description

Setting "rowHeight" or "minRowHeight" on an empty tableview (ie. no rows) used to result in the rows respecting the height. Now it seems the rows always default to the standard 44 height until rows are added. Here's a basic example:
Ti.UI.createTableView({
	rowHeight: 65
})
The workaround being used by the customer right now is to define the tableview as:
Ti.UI.createTableView({
	data: [{}],
	rowHeight: 65
})
This used to work with the 1.4.2 Helpdesk ticket: http://support.appcelerator.com/tickets/APP-445788/homepage

Comments

  1. Stephen Tramer 2011-12-05

    Needs to be examined to determine if this is still valid.
  2. Blain Hamon 2011-12-05

    Still valid. Occurs because tableview was nil during setting of the rowheight. Pull will be soon.
  3. Stephen Tramer 2011-12-05

    Full test code:
       var win = Ti.UI.createWindow({backgroundColor:'white'});
       
       var tableView = Ti.UI.createTableView({
       	rowHeight: 65
       })
       
       //tableView.data = [{ title: 'foo'}, {title:'bar'}];
       
       win.add(tableView);
       
       win.open();
       
  4. Dustin Hyde 2011-12-09

    Bug fixed. Verified on: SDK: 1.8.0.1.v20111209011840 Studio: 1.0.7.201112080131 OS: OS X Lion Devices Tested: iPhone Simulator 5.0
  5. Michael Pettiford 2012-01-04

    Reopening/closing to add/remove labels
  6. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5003

JSON Source