Description
When calling setData, child elements of the TableViewRow that have been added once are not added
var _window = Ti.UI.createWindow({ backgroundColor: 'green' });
var data = [];
var row = Ti.UI.createTableViewRow();
var lbl = Ti.UI.createLabel({
text: 'label'
})
row.add(lbl)
data.push(row);
var table = Titanium.UI.createTableView({
top: 100,
data: data
});
var btn = Ti.UI.createButton({
title: 'Add new data',
top: 5
});
btn.addEventListener('click', function() {
var newData = [];
var newRow = Ti.UI.createTableViewRow();
var newLbl = Ti.UI.createLabel({
text: 'label again'
})
newRow.add(newLbl)
newData.push(newRow);
table.setData(newData)
});
var oldbtn = Ti.UI.createButton({
title: 'Add old data',
top: 50
});
oldbtn.addEventListener('click', function() {
table.setData(data)
})
_window.add(btn);
_window.add(oldbtn)
_window.add(table);
_window.open()
Steps to reproduce
Add the above code to an existing app.js and build for Windows
Click 'Add old data' button
Click 'Add new data' button
Actual
'Add old data' does not add the label to the tableviewrow
Expected
The label should be visible in both cases
This looks to have started somewhere along the 6_0_X -> 6_1_X path
https://github.com/appcelerator/titanium_mobile_windows/pull/1166
Closing ticket; Verified fix in SDK Version: 7.1.0.v20180228160738 and SDK Version: 7.2.0.v20180301101144.