[TIMOB-25979] Android: Changing index break events on TableViewRow
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-24T01:39:43.000+0000 |
Affected Version/s | Release 7.1.0 |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | android, tableviewrow |
Reporter | CREATIVE KAIZEN |
Assignee | Yordan Banev |
Created | 2018-04-20T16:21:43.000+0000 |
Updated | 2018-09-10T10:06:11.000+0000 |
Description
When we populate TableView with TableViewRows and then change their order with updateRow method it will prevent firing events on the TableViewRow with lowest index. This includes click and touchstart events.
Code to reproduce:
var window = Ti.UI.createWindow();
window.open();
var container = Ti.UI.createView({
backgroundColor: '#333'
});
var tableView = Ti.UI.createTableView({
backgroundColor: 'white'
});
var row1 = Ti.UI.createTableViewRow({
height: 50,
backgroundColor: 'red',
className: 'scheduled'
});
var row2 = Ti.UI.createTableViewRow({
height: 50,
backgroundColor: 'green',
className: 'scheduled'
});
var row3 = Ti.UI.createTableViewRow({
height: 50,
backgroundColor: 'yellow',
className: 'scheduled'
});
tableView.appendRow(row1);
tableView.appendRow(row2);
tableView.appendRow(row3);
tableView.updateRow(0, row3); //this row will stop to react on events
tableView.updateRow(1, row2);
tableView.updateRow(2, row1);
container.add(tableView);
window.add(container);
tableView.addEventListener('click', function() {alert('clickFromTableView');});
container.addEventListener('click', function() {alert('clickFromContainer');});
PR: https://github.com/appcelerator/titanium_mobile/pull/10124
*Closing ticket*, Verified fix in SDK Version:
7.4.0.v20180717131401
Index no longer breaks on the lowest index when changing the order (Tested with the code in the description). *Test Environment**Closing ticket.* Also verified using SDK Version
7.5.0.v20180906093938