[TIMOB-11722] MobileWeb: Various parity issues with TableView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-14T20:14:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Benjamin Hatfield |
Assignee | Eric Merriman |
Created | 2012-11-09T20:10:12.000+0000 |
Updated | 2017-06-14T20:14:59.000+0000 |
Description
REPRODUCTION:
Test with code below in Google Chrome with either 3.0 or master.
RESULTS:
1. Table does not render using the sections property upon creation, but does with the data property. The methods, appendSection, insertSectionBefore and insertSectionAfter work.
2. Rows in the sections do no render properly, when using the data property upon creation or using the section methods. It's missing the lines and padding between the rows. Works fine in 2.1.3.GA.
3. The scroll event properties firstVisibleItem and totalItemCount do not report the correct information. totalItemCount reports the number of sections and firstVisibleItem either returns undefined or a TableViewRow object.
4. The scroll event properties contentSize and size report the same dimensions. I believe contentSize is correct, since it is similar to value returned by iOS and Android. size should report the visible area.
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Blueberries' }));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Cherries' }));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Figs' }));
var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Beets' }));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Leeks' }));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Onions' }));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
var sectionFish = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Cod' }));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Haddock' }));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Mahi Mahi' }));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Salmon' }));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Tuna' }));
var sectionBird = Ti.UI.createTableViewSection({ headerTitle: 'Poultry' });
sectionBird.add(Ti.UI.createTableViewRow({ title: 'Chicken' }));
sectionBird.add(Ti.UI.createTableViewRow({ title: 'Hen' }));
sectionBird.add(Ti.UI.createTableViewRow({ title: 'Ostrich' }));
sectionBird.add(Ti.UI.createTableViewRow({ title: 'Quail' }));
sectionBird.add(Ti.UI.createTableViewRow({ title: 'Turkey' }));
var table = Ti.UI.createTableView({
sections: [sectionFish, sectionFruit, sectionBird, sectionVeg]
});
table.addEventListener('scroll', function(e){
Ti.API.info(JSON.stringify(e.contentOffset) + JSON.stringify(e.contentSize) + JSON.stringify(e.size) + e.firstVisibleItem + e.totalItemCount);
})
win.add(table);
win.open();
Closing ticket due to time passed and lack of progress in the past few years. Any problems, please file a new ticket.