Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2345] iOS: TableViewRow animated:false property doesn't work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-21T12:43:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsTableViewRow, animated, animation
ReporterMatej
AssigneeMauro Parra-Miranda
Created2013-10-21T10:51:48.000+0000
Updated2016-03-08T07:41:22.000+0000

Description

TableViewRow, is impossible to switch off the animation using "animated: false".
var win = Ti.UI.createWindow();
var tableView = Ti.UI.createTableView({
	style: Ti.UI.iPhone.TableViewStyle.GROUPED
});
 
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")
    {
    	 tableView.deleteRow(2, {animated: false});
    }
    else
    {
        tableView.insertRowAfter(1, Ti.UI.createTableViewRow({title: "New Row"}), {animated: false});
    }
});


/* ===> WORK AROUND - BUT IT DOESN'T WORK ON 100% ANYWAY
tableView.addEventListener("click", function(e){
    if(e.rowData.title == "Remove third row")
    {    	 
    	var rows = tableView.data[0].rows;

		rows.splice(2, 1);

    	tableView.data[0]["rows"] = rows;

    	tableView.setData(tableView.data);
    }
    else
    {
    	var rows = tableView.data[0].rows;

		rows.push(Ti.UI.createTableViewRow({title: "New Row"}));

    	tableView.data[0]["rows"] = rows;

    	tableView.setData(tableView.data);
    }
});*/

Comments

  1. Matej 2013-10-21

  2. Mostafizur Rahman 2013-10-21

  3. Matej 2013-10-21

    Hi, sorry for that. Thanks
  4. Mauro Parra-Miranda 2013-11-24

    DUP issue.
  5. Matej 2013-11-25

    Mostafizur Rahman: Hi, sorry ,but I can't see TIMOB-13401 because of "Permission Violation". Can you help me how to solve it out? Thanks

JSON Source