Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: Release 6.0.4, Release 6.1.2, Release 7.0.0, Release 6.2.0
-
Fix Version/s: Release 7.0.0
-
Component/s: Windows
-
Labels:None
-
Environment:
Ti SDk 6.0.4.GA, 6.1.2.GA, 6.2.0.v20170912203804, 7.0.0.v20170906135653
-
Story Points:3
-
Sprint:2017 Sprint 22 SDK, 2017 Sprint 23 SDK
Description
Description
The index property of a tableview click event is in relation to the tableviewsection, it should be in relation to the entirety of the tableview
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' }));
|
|
var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
|
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
|
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
|
|
var table = Ti.UI.createTableView({
|
data: [sectionFruit, sectionVeg]
|
});
|
|
table.addEventListener('click', function (e) {
|
alert(e.index);
|
});
|
|
win.add(table);
|
win.open();
|
Steps to reproduce
- Add the above to an existing app.js and build for Windows
- Click Row 10 in section 2
Actual
Row 0 in Section 1 gets updated
Expected
Row 10 in section 2 should be updated
Attachments
Issue Links
- Affects test execution of
-
TIMOB-22446 Ti.UI.TableView Test Suite: Titanium.UI.TableView Acceptance TIMOB-9702 (Titanium SDK/CLI/Release 6.2.0/Windows-Windows Tests) FAIL