Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1410] Can't Add Children to Table Rows 1.4.0

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:06.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsipad, regression, render, rows, tableviewrow
ReporterPaul Armstrong
AssigneeReggie Seagraves
Created2011-04-15T02:51:32.000+0000
Updated2011-04-17T01:56:06.000+0000

Description

As the title says, any attempt at adding a child to a tableViewRow results in an empty row with no separators between the previous and next rows.

Example:

Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow();
var table = Ti.UI.createTableView({

height: 44,
width: 400,
top: 300,
style: Ti.UI.iPhone.TableViewStyle.PLAIN

}); var tableRow = Ti.UI.createTableViewRow({

title: 'Table 1',
height: 44,
width: 400

}); var theswitch = Ti.UI.createSwitch({

value: true,
right: 10

}); tableRow.add(theswitch);
table.appendRow(tableRow);
win.add(table);
var table2 = Ti.UI.createTableView({

height: 44,
width: 400,
top: 600,
style: Ti.UI.iPhone.TableViewStyle.PLAIN

});

var tableRow2 = Ti.UI.createTableViewRow({

title: 'Table 2',
height: 44,
width: 400

}); table2.appendRow(tableRow2);
win.add(table2);
win.open();

Attachments

FileDateSize
app.js2011-04-15T02:51:32.000+0000886
capture-1.png2011-04-15T02:51:32.000+0000127285

Comments

  1. Paul Armstrong 2011-04-15

    I fail to see how this is a low priority issue. It's clear intended functionality that is completely broken.
    The first table in this screenshot should say "Table 1" and have a switch on it: http://grab.by/5DRf">http://grab.by/5DRf

  2. Jeff Haynie 2011-04-15

    Dude. Chill. The default priority is simply low. We're already working on it at 9:50pm tonight ...

  3. Paul Armstrong 2011-04-15

    Sorry, I didn't know everything was marked that way.

  4. Jeff Haynie 2011-04-15

    OK, this looks to be an embarassing regression in 1.4.0 we introduced related to non-tab groups.

    There is a simple workaround that has no impact.

    If you add a className property to your row object it will render. Just make the value of your className something like "switch".

    If you use the same structure on multiple rows, you can use the same value for className. If you have different structures on each row, make sure to use a different value.

  5. Paul Armstrong 2011-04-15

    Whoops!

    I can confirm, adding className to a row fixes it.

  6. Tamas Daniel 2011-04-15

    No it's not, at least on iPad.
    I always use classNames for the rows, no matter how big or small is the table, and I can say for iPad is broken.

  7. Tamas Daniel 2011-04-15

    Ok, here is my test case, attached.

    After a small scrolling they appear, but slow.

    So there are two issues here:
    one is the missing rows, a
    and second is the speed - make in the for loop to render 25 rows, and try to scroll a little( I suppose they are related as on the iphone is fast :) )

  8. Blain Hamon 2011-04-15

    It was related to the infinite loop table views were having.

  9. Thomas Huelbert 2011-04-15

    valid, needs testcase
    confirmed fixed against 1.4.1.aff269

JSON Source