[TIMOB-12170] Mobile Web: Problem with rows in TableView beyond the first TableViewSection
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2017-06-26T20:11:12.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Yaroslav Pidstryhach |
Assignee | Chris Barber |
Created | 2012-11-28T13:59:11.000+0000 |
Updated | 2018-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
This bug is fixed in the Tizen repo. The fix may be directly ported to Mobile Web.
Sounds good. Link / pull request?
Yes, a pull request will follow shortly.
Pull request that contains a fix: https://github.com/appcelerator/titanium_mobile/pull/3646
The rejected pull request is currently being improved. A new one will be issued in the nearest days.
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.