Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24124] Windows: Updating a tableView section with a headerView causes a layout issue

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-11-07T20:59:12.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 7.0.0
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-11-09T12:05:43.000+0000
Updated2017-11-17T00:29:13.000+0000

Description

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

Comments

  1. Kota Iguchi 2017-10-23

    https://github.com/appcelerator/titanium_mobile_windows/pull/1147
  2. Abir Mukherjee 2017-11-17

    Tested on SDK 7.0.0.v20171116132144 installed from CLI. Fix is verified.

JSON Source