Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3226] Android: tableview.appendRow only shows first row's header

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T03:39:58.000+0000
Affected Version/sn/a
Fix Version/sSprint-2011-09
ComponentsAndroid
Labelsandroid, defect, header, release-1.6.0, tableviewrow
ReporterAlan Leard
AssigneeDon Thorp
Created2011-04-15T03:39:58.000+0000
Updated2017-03-03T06:23:14.000+0000

Description

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])'

Also added headers to the table_view_row_append.js file in LS for testing. Same results.

Ticket Reference: http://developer.appcelerator.com/helpdesk/view/75741">http://developer.appcelerator.com/helpdesk/view/75741

Comments

  1. Bill Dawson 2011-04-15

    dupe #873

  2. Don Thorp 2011-04-15

    Added milestone where it was marked duplicate.

  3. Lee Morris 2017-03-03

    Closing issue due to time passed and irrelevance of the ticket.

JSON Source