[TIMOB-25843] Android: 7.1.0.RC - Setting data in Ti.UI.TableView does not work as before
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-03-08T00:03:20.000+0000 |
Affected Version/s | Release 7.1.0, Release 7.0.2 |
Fix Version/s | Release 7.1.0 |
Components | Android |
Labels | ANDROID, CLI7.0.2.GA, SDK7.1.0.RC, Studio5.0.0.GA, regression |
Reporter | Andreas Pingas |
Assignee | Gary Mathews |
Created | 2018-03-06T11:57:19.000+0000 |
Updated | 2018-03-14T18:08:55.000+0000 |
Description
*This is a regression from 7.0.2 to 7.1.0*
I have tried 7.1.0.RC
It used to work properly in the past ...
tableData[2] = tableViewSection3;
tableView.data = tableData;
However, now it only works this:
tableView.updateSection(2, tableViewSection3);
function createTableViewRow(e) {
var rowView = Titanium.UI.createTableViewRow({
height: 120
});
rowView.add(Titanium.UI.createLabel({
text:'Text',
}));
return rowView;
}
var win = Ti.UI.createWindow();
var tableData = [];
var tableView = Titanium.UI.createTableView({
separatorStyle:Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE
});
var tableViewSection1 = Ti.UI.createTableViewSection();
var tableViewSection2 = Ti.UI.createTableViewSection();
var tableViewSection3 = Ti.UI.createTableViewSection();
tableData.push(tableViewSection1);
tableData.push(tableViewSection2);
tableData.push(tableViewSection3);
tableView.data = tableData;
win.add(tableView);
var setData = function(e) {
tableViewSection3.add(createTableViewRow());
tableViewSection3.add(createTableViewRow());
tableViewSection3.add(createTableViewRow());
//tableView.updateSection(2, tableViewSection3);
tableData[2] = tableViewSection3;
tableView.data = tableData;
};
win.addEventListener('open', function(e) {
setData();
});
win.open();
Here's another test case:
Tested on
7.1.0.v20180306061214
, issue is present.Regression caused by: master: https://github.com/appcelerator/titanium_mobile/pull/9701 7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9874
master: https://github.com/appcelerator/titanium_mobile/pull/9916 7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9917
FR Passed. PR's merged.
Verified the fix in SDK 7.1.0.v20180308150545 & 7.2.0.v20180313125304. Closing. Studio Ver: 5.0.0.201712081732 OS Ver: 10.13.2 Xcode Ver: Xcode 9.2 Appc NPM: 4.2.12 Appc CLI: 7.0.2 Daemon Ver: 1.0.1 Ti CLI Ver: 5.0.14 Alloy Ver: 1.11.0 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 — Android 6.0.1 ⇨ google Nexus 6P — Android 8.0.0