[TIMOB-10487] MobileWeb: tableView deleteRow Uncaught TypeError: Cannot read property 'section' of undefined
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2017-06-26T22:01:32.000+0000 |
| Affected Version/s | Release 2.0.2, Release 2.1.2 |
| Fix Version/s | n/a |
| Components | MobileWeb |
| Labels | api, qe-mw082012 |
| Reporter | Dustin Hyde |
| Assignee | Chris Barber |
| Created | 2012-08-17T16:35:37.000+0000 |
| Updated | 2018-04-04T23:20:23.000+0000 |
Description
Under certain conditions, tableView deleteRow fails with Uncaught TypeError: Cannot read property 'section' of undefined.
This is not a regression. This does not occur in iOS or Android.
Test project attached.
Debug Source:
_removeRow: function(index) {
var location = this._calculateLocation(index);
this._unpublish(location.section._rows._children[2 * location.localIndex + 1]);
Uncaught TypeError: Cannot read property 'section' of undefined
if (location) {
location.section._removeAt(location.localIndex);
}
},
Steps to Reproduce:
1. Run attached project.
2. Click Returns.
3. Wait for ACS query.
4. Click top row.
Actual Result:
Runtime Error.
Expected Result:
Top row should be removed from top TableView and added to bottom TableView.
Note: This does not occur using simplified code:
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var table1 = Ti.UI.createTableView({
top : 0,
left : 0,
width : '100%',
height : '50%'
});
var row = Ti.UI.createTableViewRow({
title : 'click top row, then bottom row'
});
table1.appendRow(row);
var table2 = Ti.UI.createTableView({
bottom : 0,
left : 0,
width : '100%',
height : '50%'
});
win.add(table1);
win.add(table2);
table1.addEventListener('click', function(e) {
table1.deleteRow(e.index);
table2.appendRow(e.row);
});
win.open();
Attachments
| File | Date | Size |
|---|---|---|
| InventoryApp.zip | 2012-08-17T16:35:37.000+0000 | 3127771 |
Resolving as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.