Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12393] iOS: Click event on table row added in section is not getting fired

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-07-06T21:32:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
Reportervirendra patidar
AssigneeEric Merriman
Created2013-01-21T14:36:09.000+0000
Updated2017-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();

Comments

  1. Daniel Sefton 2013-01-23

    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.
  2. Pedro Enrique 2013-01-23

    Reopening, since *sections* was introduced in 3.0 For a workaround, use *data* as Daniel suggested
  3. virendra patidar 2013-01-24

    yes working with data.. but support for setSections can be added in future releases.
  4. Lee Morris 2017-07-06

    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

JSON Source