Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8709] iOS: tableView 'index' property breaks tableRow layout

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-10T04:31:50.000+0000
Affected Version/sRelease 2.1.0, Release 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-09 API
ComponentsiOS
LabelsSupportTeam, api, module_tableview, qe-testadded
ReporterFederico Casali
AssigneeRadamantis Torres-Lechuga
Created2012-04-12T16:46:07.000+0000
Updated2012-07-11T11:01:47.000+0000

Description

Problem description

Setting an index property for the tableView could break text tableRow layout

Steps to reproduce

- Create a tableView with tableRows including different sized text (see code sample) - Set the 'index' property for the tabelView (see code sample) Result: some text might not be displayed as expected Attached two screenshots, using 'index:[{index:0,title:'a'},{index:1,title:'b'}]' or not.
var win = Ti.UI.createWindow();
win.open();


var row1 = Ti.UI.createTableViewRow({
    // height:'auto',   
    height:Ti.UI.SIZE

});
var label1 = Ti.UI.createLabel({
    // height:'auto',
    top:0,
    height:Ti.UI.SIZE,
    text:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
});

row1.add(label1);

var row2 = Ti.UI.createTableViewRow({
    // height:'auto',   
    height:Ti.UI.SIZE
});
var label2 = Ti.UI.createLabel({
    // height:'auto',   
    height:Ti.UI.SIZE,
    top:0,
    text:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
});

row2.add(label2);


var table = Ti.UI.createTableView({
    index:[{index:0,title:'a'},{index:1,title:'b'}],
    data:[row1,row2]
});

win.add(table);

Additional notes

Customer ticket: http://support-admin.appcelerator.com/display/APP-276887

Attachments

FileDateSize
INDEX.png2012-04-12T16:46:07.000+000047268
noINDEX.png2012-04-12T16:46:07.000+000062339

Comments

  1. Michael Pettiford 2012-06-20

    Closing issue Tested with Ti Studio build 2.1.0.201206200844 Ti Mobile SDK 2.1.0.v20120619172256 hash rd3a84b13 OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
  2. Anshu Mittal 2012-07-10

    Reopening to update labels.

JSON Source