Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13021] IOS:TableViewRow whose movable property is set to 'false' can be rearranged if other movable rows drag above it.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-07-22T23:26:16.000+0000
Affected Version/sRelease 2.1.4, Release 3.0.0, Release 3.0.2
Fix Version/s2013 Sprint 15 API, 2013 Sprint 15
ComponentsiOS
Labelsipass1, supportTeam
ReporterRupesh Sharma
AssigneeIngo Muschenetz
Created2013-03-11T13:12:27.000+0000
Updated2017-03-28T20:36:29.000+0000

Description

Description

For TableViewRow whose movable property is set to false should not be rearrange if other movable rows try to drag above it. Similar functionality can be viewed in Iphone mail app in which "All Inboxes" row is always at the top, and other rows cannot be dragged above it. Please see the attached screenshot representing the same. While in the below case movable rows are able to drag above the fixed row whose movable property is set to false. Please see the below code to reproduce the same:
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});
var data = [];
var row1 = Ti.UI.createTableViewRow({
    title: 'Should be fixed',
    moveable: false
});
var section1 = Ti.UI.createTableViewSection({
    rows: [row1]
})
data.push(section1)
var row2 = Ti.UI.createTableViewRow({
    title: 'Moveable 1',
    moveable: true
});
var row3 = Ti.UI.createTableViewRow({
    title: 'Moveable 2',
    moveable: true
});
var section2 = Ti.UI.createTableViewSection({
    rows: [row2, row3]
})
data.push(section2)
var tableView = Ti.UI.createTableView({
    data:data,
    moving: true,
    moveable: false,
    style: Titanium.UI.iPhone.TableViewStyle.GROUPED
})
win1.add(tableView);
tabGroup.addTab(tab1);
tabGroup.open();

Attachments

FileDateSize
rearrange-mail-inboxes-ios.jpg2013-03-14T09:25:52.000+000040930

Comments

  1. jithinpv 2013-05-03

    cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Shyam Bhadauria 2013-05-09

    The issue is reproducible with below environment: SDK: 3.0.0.GA , 3.0.2.GA , 3.1.0.GA , 3.1.1.v20130508001914 Studio: Appcelerator studio 3.1.1.201305072102 and Titanium studio 3.1.0.201304171607 Device : iOS simulator 6.0 The test code renders 3 tableviewrow. Top most has moveable property set to false.The rest two tableviewrow have moveable property set to true. Steps to reproduce: 1.Run the given sample app 2.Drag the 2nd and 3rd tableviewrow above the 1st tableviewrow Expected result 1.3 tableviewrow are displayed 2.The top tableviewrow should not move from its position. Actual result: 1.3 tableviewrow are displayed 2.The top tableviewrow moves from its position and the 2 tableviewrow get placed above it.
  3. Vishal Duggal 2013-07-22

    This is not a bug. The functionality that is being requested is controlled by the UITableViewDelegate method - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath We do not expose this functionality. In Titanium a movable row can be positioned anywhere in the tableView.
  4. Eric Merriman 2017-03-28

    Closing

JSON Source