Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24116] Windows: TableView.headerView/headerTitle cannot be set after setting data

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-11-24T12:28:56.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sn/a
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-11-08T14:11:16.000+0000
Updated2018-08-06T17:57:35.000+0000

Description

Description

*This only occurs when the data property is set before the headerTitle/headerView property* When attempting to set either a headerView or a headerTitle on a tableview the property is not reflected.
var _window = Ti.UI.createWindow();
var data = [{title: 'Alan'}, {title: 'Alice'}, {title: 'Alexander'}, {title: 'Amos'}, {title: 'Alonzo'}, {title: 'Brad'}, {title: 'Brent'}, {title: 'Billy'}, {title: 'Brenda'}, {title: 'Potsie'}];
var header = Ti.UI.createView({
    backgroundColor: 'red',
    height: 100
});
var tableview = Titanium.UI.createTableView({
    data: data,
    headerTitle: 'This is a test-test',
    // headerView: header
});
_window.add(tableview);
_window.open();
*Workaround* Move the data property after the headerTitle/headerView

Steps to reproduce

Add the above code to an existing app.js

Build for Windows Platform

Actual result

headerTitle and headerView are not set

Expected result

headerTitle and headerView should be set

Comments

  1. Ewan Harris 2016-11-08

    This only happens when the data property is set before the headerTitle/headerView, reducing severity to minor and adding workaround
  2. Kota Iguchi 2016-11-23

    https://github.com/appcelerator/titanium_mobile_windows/pull/896
  3. Eric Merriman 2018-08-06

    Cleaning up older fixed tickets from 2016 and earlier. If this ticket should not have been closed, please reopen it.

JSON Source