Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15536] iOS7: TableView.deleteRow() animationStyle doesn't work properly if called after setting hasCheck()

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-09-25T23:42:41.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sRelease 3.4.0
ComponentsiOS
LabelsSupportTeam, qe-automatedtest
ReporterMatej
AssigneeIngo Muschenetz
Created2013-10-18T11:04:55.000+0000
Updated2015-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});
	}
});

Comments

  1. Matej 2013-10-20

  2. Shameer Jan 2014-09-19

    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
  3. Ewan Harris 2014-09-25

    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.
  4. Ewan Harris 2014-09-25

    Reopening to fix tester field

JSON Source