[TIMOB-1410] Can't Add Children to Table Rows 1.4.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | ipad, regression, render, rows, tableviewrow |
Reporter | Paul Armstrong |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:51:32.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
app.js | 2011-04-15T02:51:32.000+0000 | 886 |
capture-1.png | 2011-04-15T02:51:32.000+0000 | 127285 |
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
Dude. Chill. The default priority is simply low. We're already working on it at 9:50pm tonight ...
Sorry, I didn't know everything was marked that way.
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.
Whoops!
I can confirm, adding className to a row fixes it.
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.
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 :) )
It was related to the infinite loop table views were having.
valid, needs testcase
confirmed fixed against 1.4.1.aff269