Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12170] Mobile Web: Problem with rows in TableView beyond the first TableViewSection

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T20:11:12.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterYaroslav Pidstryhach
AssigneeChris Barber
Created2012-11-28T13:59:11.000+0000
Updated2018-04-04T23:20:27.000+0000

Description

*Reproduction steps* 1. Create basic titanium mobile project. 2. Add one TableView with two TableViewSections. Each TableViewSection has several rows (TableViewRow). 3. Run it as mobile web preview in web browser. *Expected behavior* TableView with two sections and rows. *Actual behavior* Only the first section has rows (property rows is undefined for second section). NOT reproducible in 2.1.4.GA version. *Sample program*
var win1 = Titanium.UI.createWindow({ title:'Tab 1',  backgroundColor:'#fff'});

var section = Titanium.UI.createTableViewSection();
section.headerTitle = "Hello";
var row1 = Titanium.UI.createTableViewRow({title:"Insert Row Above (no anim)"});
var row2 = Titanium.UI.createTableViewRow({title:"Insert Row Below - 1", name: "3"});
var row21 = Titanium.UI.createTableViewRow({title:"Insert Row Below - 11", name: "33"});
	
var section2 = Titanium.UI.createTableViewSection();
section2.headerTitle = "Hello2";
var row3 = Titanium.UI.createTableViewRow({title:'Insert Row Below - Header', name:'13'});
var row4 = Titanium.UI.createTableViewRow({title:'Insert Row Above - Header - 2', name:'10'});
var row5 = Titanium.UI.createTableViewRow({title:'Insert Row Above - Header - 3', name:'11'});
	
section.add(row1);
section.add(row2);
section.add(row21);
section2.add(row3);
section2.add(row4);
section2.add(row5);
	
var tableView = Titanium.UI.createTableView({data: [section, section2]});		
win1.add(tableView);

console.log('--------------------------------------------------------------------');
for (var i in tableView.data) {
	console.log(i + ': ' + tableView.data[i]);
	console.log('section.rows[' + i + '] : ' + tableView.data[i].rows);	
}
console.log('--------------------------------------------------------------------');

win1.open();
*Expected program printout*
0: [object TiUITableViewSection]
section.rows[0] : [object TiUITableViewRow],[object TiUITableViewRow],[object TiUITableViewRow]
1: [object TiUITableViewSection]
section.rows[1] : [object TiUITableViewRow],[object TiUITableViewRow],[object TiUITableViewRow]
*Actual program printout*
0: [object TiUITableViewSection]
section.rows[0] : [object TiUITableViewRow],[object TiUITableViewRow],[object TiUITableViewRow]
1: [object TiUITableViewSection]
section.rows[1] : undefined

Comments

  1. Yaroslav Pidstryhach 2012-12-19

    This bug is fixed in the Tizen repo. The fix may be directly ported to Mobile Web.
  2. Daniel Sefton 2012-12-23

    Sounds good. Link / pull request?
  3. Yaroslav Pidstryhach 2012-12-25

    Yes, a pull request will follow shortly.
  4. Yaroslav Pidstryhach 2012-12-28

    Pull request that contains a fix: https://github.com/appcelerator/titanium_mobile/pull/3646
  5. Yaroslav Pidstryhach 2013-01-02

    The rejected pull request is currently being improved. A new one will be issued in the nearest days.
  6. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  7. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source