[TIMOB-694] tableview.appendRow only shows first row's header
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | header, ios, row, tableview |
Reporter | Noah |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:34:38.000+0000 |
Updated | 2011-04-17T01:53:56.000+0000 |
Description
[Copied from Titanium Developer ticket]
tableView.appendRow(row) does not always render the row the same as tableView.setData(data), specifically I have seen differences with how it handles headers attached to rows. Take the following example (written inline, excuse any minor syntax errors here)
Does not work, header is only applied to first row
var tableView = Titanium.UI.createTableView({});
window.add(tableView);
var row = Ti.UI.createTableViewRow({header: 'foobar'});
tableView.appendRow(row);
var row2 = Ti.UI.createTableViewRow({header: 'foobar 2'});
tableView.appendRow(row2);
Works, header is applied to all rows:
var tableView = Titanium.UI.createTableView({});
window.add(tableView);
var row = Ti.UI.createTableViewRow({header: 'foobar'});
var row2 = Ti.UI.createTableViewRow({header: 'foobar 2'});
tableView.setData([row, row2])'
Fixed long ago (1.4.0?) and validated in 1.6.0 RC1.