[TIMOB-24858] Windows: TableViewRow defaults to horizontal layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-11-07T12:19:09.000+0000 |
Affected Version/s | Release 6.1.0, Release 6.1.1 |
Fix Version/s | Release 7.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Kota Iguchi |
Created | 2017-06-20T11:40:37.000+0000 |
Updated | 2017-11-17T00:27:28.000+0000 |
Description
TableViewRow defaults to horizontal on Windows, this is evidenced by the below code where the labels are added next to the last label added rather than at the right hand side of the TableViewRow, and row.layout logging horizontal
var _window = Ti.UI.createWindow();
var row = Ti.UI.createTableViewRow({
width: 300,
height: 40
});
var nameLabel = Titanium.UI.createLabel({
text: 'Title',
left: 10
});
row.add(nameLabel);
var tableView = Ti.UI.createTableView({
top: 0,
width: 300,
height: Ti.UI.SIZE,
data: [row]
});
var addButton = Ti.UI.createButton({
title: 'Add Label',
width: 200,
height: 100
});
addButton.addEventListener('click', function() {
var valueLabel1 = Ti.UI.createLabel({
text: 'New Label'
});
row.add(valueLabel1);
});
_window.add(tableView);
_window.add(addButton);
console.log(row.layout);
_window.open();
https://github.com/appcelerator/titanium_mobile_windows/pull/1153
Tested on SDK 7.0.0.v20171116132144 installed from CLI. Fix is verified.