Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: Release 6.1.2, Release 7.0.0, Release 6.2.0
-
Fix Version/s: Release 7.1.0
-
Component/s: Windows
-
Labels:None
-
Environment:
Ti SDK: 6.1.2.GA, 6.2.0.v20170912203804, 7.0.0.v20170906135653
-
Story Points:5
-
Sprint:2017 Sprint 22 SDK, 2017 Sprint 25 SDK, 2017 Sprint 26 SDK, 2018 Sprint 01 SDK, 2018 Sprint 02 SDK
Description
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
Attachments
Issue Links
- relates to
-
TIMOB-25595 Windows: selecting search result with searchbar and in tableview shows empty row
-
- Closed
-
- Affects test execution of
-
TIMOB-22422 Ti.UI.TableView Test Suite: Titanium.UI.TableView Acceptance TIMOB-6134 (Titanium SDK/CLI/Release 6.2.0/Windows-Windows Tests) FAIL