Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-694] tableview.appendRow only shows first row's header

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:53:56.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsheader, ios, row, tableview
ReporterNoah
AssigneeReggie Seagraves
Created2011-04-15T02:34:38.000+0000
Updated2011-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])'

Comments

  1. Stephen Tramer 2011-04-15

    Fixed long ago (1.4.0?) and validated in 1.6.0 RC1.

JSON Source