Description
When calling update on a tableviewsection to include a headerView a layout issue occurs
var win = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var header1 = Ti.UI.createView({backgroundColor: 'red '});
var label = Ti.UI.createLabel({
text: "That Section"
});
header1.add(label);
var section_0 = Ti.UI.createTableViewSection({ headerView: header1 });
section_0.add(Ti.UI.createTableViewRow({ title: 'Red' }));
var header2 = Ti.UI.createView();
var label2 = Ti.UI.createLabel({
text: "This Section"
});
header2.add(label2);
var section_2 = Ti.UI.createTableViewSection({ headerView: header2});
section_2.add(Ti.UI.createTableViewRow({ title: 'Gray' }));;
var tableView = Ti.UI.createTableView({
data: [section_0]
});
win.addEventListener('click', function () {
tableView.updateSection(0, section_2);
});
win.add(tableView);
win.open();
Steps to reproduce
Add the code above to an existing app.js
Tap the tableviewrow
Actual result
The tableview is updated and headerView is now partially off screen
Expected result
No layout errors should occur
https://github.com/appcelerator/titanium_mobile_windows/pull/1147
Tested on SDK 7.0.0.v20171116132144 installed from CLI. Fix is verified.