[TIMOB-12393] iOS: Click event on table row added in section is not getting fired
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-07-06T21:32:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | virendra patidar |
Assignee | Eric Merriman |
Created | 2013-01-21T14:36:09.000+0000 |
Updated | 2017-07-06T21:32:57.000+0000 |
Description
*Problem description*
The click event on Apple row (which is added in section) is not getting fired while which is added in table main section is getting called in 3.0 GA release. This looks like a regression.
*Test case*
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var sectionFruit = Ti.UI.createTableViewSection({
headerTitle : 'Fruit'
});
sectionFruit.add(Ti.UI.createTableViewRow({
title : 'Apples'
}));
var table = Ti.UI.createTableView({
sections : [sectionFruit] // Replace 'sections' with 'data'
});
win.add(table);
var newrow = Ti.UI.createTableViewRow({
title : 'new Row'
});
table.appendRow(newrow);
table.addEventListener('click', function(e) {
alert('Clicked e');
});
win.open();
Hi virenda, Please use "data" in place of the "sections" property. The sections property is intended to "get" sections, but not to set them. See the updated test case. Closing as invalid. Cheers.
Reopening, since *sections* was introduced in 3.0 For a workaround, use *data* as Daniel suggested
yes working with data.. but support for setSections can be added in future releases.
The click event is fired on the application and I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131