[TIMOB-15536] iOS7: TableView.deleteRow() animationStyle doesn't work properly if called after setting hasCheck()
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-09-25T23:42:41.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | Release 3.4.0 |
Components | iOS |
Labels | SupportTeam, qe-automatedtest |
Reporter | Matej |
Assignee | Ingo Muschenetz |
Created | 2013-10-18T11:04:55.000+0000 |
Updated | 2015-01-09T17:23:18.000+0000 |
Description
deleteRow animationStyle doesn't work properly if the statement comes after changing the hasCheck property of the TableViewRow.
var win = Ti.UI.createWindow();
var tableView = Ti.UI.createTableView();
var removeThirdRow = Ti.UI.createTableViewRow({title: "Remove third row"}),
addNewRow = Ti.UI.createTableViewRow({title: "Add new row"}),
lastOne = Ti.UI.createTableViewRow({title: "... ... ..."});
tableView.data = [removeThirdRow, addNewRow, lastOne];
win.add(tableView);
win.open();
tableView.addEventListener("click", function(e){
if(e.rowData.title == "Remove third row")
{
removeThirdRow.hasCheck = true;
addNewRow.hasCheck = false;
tableView.deleteRow(2, {animationStyle: Ti.UI.iPhone.RowAnimationStyle.LEFT});
/* ===> THIS DOES WORK
tableView.deleteRow(2, {animationStyle: Ti.UI.iPhone.RowAnimationStyle.LEFT});
removeThirdRow.hasCheck = true;
addNewRow.hasCheck = false;
*/
}
else
{
addNewRow.hasCheck = true;
removeThirdRow.hasCheck = false;
tableView.appendRow(Ti.UI.createTableViewRow({title: "New Row"}), {animationStyle: Ti.UI.iPhone.RowAnimationStyle.RIGHT});
}
});
Issue exist with 3.1.3 but can't reproduce on 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 TiSDK 3.4.0 iOS : 7.0 Titanium Command-Line Interface, CLI version 3.3.0
Verified fix on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409231834 Titanium SDK build: 3.4.0.v20140925154326 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc5 Xcode6.0.1 iPhone 6 (8.0) When deleteRow() is called after hasCheck has been set, the animation is displayed correctly and matches when the reverse happens. Closing ticket.
Reopening to fix tester field