[AC-6688] Android: Tableview insertRowAfter/Before works with first section only
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-03-24T19:31:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Ahmed Mohamed |
Assignee | Gary Mathews |
Created | 2021-03-23T15:25:31.000+0000 |
Updated | 2021-03-24T22:18:13.000+0000 |
Description
When trying to insert a row in any section below the first section it doesn't work on Android but it works on iOS as it should be.
So insertRowAfter / insertRowBefore doesn't work.
var win = Ti.UI.createWindow();
var sectionOne = Ti.UI.createTableViewSection({
headerTitle: 'Section One'
});
sectionOne.add(Ti.UI.createTableViewRow({
title: 'Row 1'
}));
sectionOne.add(Ti.UI.createTableViewRow({
title: 'Row 2'
}));
var sectionTwo = Ti.UI.createTableViewSection({
headerTitle: 'Section Two'
});
sectionTwo.add(Ti.UI.createTableViewRow({
title: 'Row 3'
}));
sectionTwo.add(Ti.UI.createTableViewRow({
title: 'Row 4'
}));
var table = Ti.UI.createTableView({
data: [sectionOne, sectionTwo]
});
var button = Ti.UI.createButton({
title: "Add Row",
bottom: 16
});
button.addEventListener('click', () => {
var row = Ti.UI.createTableViewRow({
title: "New Row"
});
table.insertRowAfter(2, row, {
animated: true
});
});
win.add(table);
win.add(button);
win.open();
This has been fixed in the latest
master
and10_0_X
branches. *TEST CASE*I haven't seen any related ticket but after build 9_3_x I confirm this issue has been resolved. Thanks