Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13886] iOS: Controls hidden from the table row when table is scrolling

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-19T18:02:35.000+0000
Affected Version/sRelease 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterDavid He
AssigneeEric Merriman
Created2013-05-16T00:34:15.000+0000
Updated2017-06-19T18:02:35.000+0000

Description

*Problem* Either the switch or Test button will be hidden when you keep scrolling the table. *Steps to reproduce* 1. Run the test case in the iOS simulator 2. Scroll up and down repeatedly 3. Observe that the ismp_us toggle switch and the test_connection Test button sometimes disappear. *Test case* Note: Use the code below, not the attachment.
var win = Ti.UI.createWindow({
	backgroundColor : "#FFF"
});

var btn = Ti.UI.createButton({
	title : "back"
});

win.setLeftNavButton(btn);

btn.addEventListener("click", function(e) {
	win.close();
});

var content = "content";

var global = {};
global.table = buildTable();
var data = [];

global.eftNameRow = Ti.UI.createTableViewRow({
	title : ("ismp_us"),
	height : 44
});

global.eftSwitch = Ti.UI.createSwitch({
	value : true,
	right : 10
});

global.eftNameRow.add(global.eftSwitch);

/*
 * Merchant Id
 */
global.merchantIdRow = Ti.UI.createTableViewRow({
	title : ("merchant_id"),
	header : ' '
});

global.midTf = buildTf(150);
global.merchantIdRow.add(global.midTf);

/*
 * Terminal ID
 */
global.terminalIdRow = Ti.UI.createTableViewRow({
	title : ("terminal_id")
});

global.tidTf = buildTf(150);

global.terminalIdRow.add(global.tidTf);

/*
 * Terminal Name
 */
global.terminalNameRow = Ti.UI.createTableViewRow({
	title : ("terminal_name")
});

global.tNameTf = buildTf(150);

global.terminalNameRow.add(global.tNameTf);

/*
 * Bank Name
 */
global.bankNameRow = Ti.UI.createTableViewRow({
	title : ("bank_name")
});

global.bankNameTf = buildTf(150);

global.bankNameRow.add(global.bankNameTf);

/*
 * Operator
 */
global.opRow = Ti.UI.createTableViewRow({
	title : ("operator")
});

global.opTf = buildTf(150);

global.opRow.add(global.opTf);

/*
 * Bank URL
 */
global.bankUrlRow = Ti.UI.createTableViewRow({
	title : ("bank_url")
});

global.bUrlTf = buildTf(150);

global.bankUrlRow.add(global.bUrlTf);

/*
 * Bank Web Access Password
 */
global.bankWebRow = Ti.UI.createTableViewRow({
	title : ("bank_web_access_password"),
	font : {
		fontSize : 14,
		fontWeight : "bold",
		fontFamily : "Arial"
	}
});

global.webUrlTf = buildTf();

global.bankWebRow.add(global.webUrlTf);

/*
 * Username
 */
global.usrNameRow = Ti.UI.createTableViewRow({
	title : ("username")
});

global.usrTf = buildTf(150);

global.usrNameRow.add(global.usrTf);

/*
 * Password
 */
global.psdRow = Ti.UI.createTableViewRow({
	title : ("password")
});

global.psdTf = buildTf(150);

global.psdRow.add(global.psdTf);

/*
 * Signature Required
 */
global.signRow = Ti.UI.createTableViewRow({
	title : ("signature_required")
});

global.sigTf = buildTf(80);

global.signRow.add(global.sigTf);

/*
 * Test Conn
 */
global.testConnRow = Ti.UI.createTableViewRow({
	title : ("test_connection")
});

global.testBtn = Ti.UI.createButton({
	right : 10,
	width : 40,
	height : 30,
	title : "Test"
});

global.testConnRow.add(global.testBtn);

/*
 * Config
 */
global.configRow = Ti.UI.createTableViewRow({
});

global.configBtn = Ti.UI.createButton({
	right : 10,
	width : 150,
	height : 30,
	title : 'Configure Merchant'
});

global.configRow.add(global.configBtn);

data.push(global.eftNameRow);
data.push(global.merchantIdRow);
data.push(global.terminalIdRow);
data.push(global.bankNameRow);
data.push(global.opRow);
data.push(global.bankUrlRow);
data.push(global.bankWebRow);
data.push(global.usrNameRow);
data.push(global.psdRow);
data.push(global.signRow);
data.push(global.testConnRow);
data.push(global.configRow);

global.table.setData(data);

function buildTable() {
	var tableOBJ = Ti.UI.createTableView({
		editable : false,
		top : 0,
		rowHeight : 44
	});

	tableOBJ.style = Titanium.UI.iPhone.TableViewStyle.GROUPED;

	return tableOBJ;
}

function buildTf(width) {
	var tfOBJ = Ti.UI.createTextField({
		right : 10,
		width : 100,
		borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
		color : '#385487',
		height : 30,
		value : '687777'
	});

	return tfOBJ;
}

win.add(global.table);
win.open();

Attachments

FileDateSize
newTest.js2013-05-16T00:34:15.000+00003717

Comments

  1. David He 2013-05-16

    Please refer to [http://developer.appcelerator.com/question/152388/missing-components-in-the-table-when-scrolling]
  2. Daniel Sefton 2013-05-16

    Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and 3.2 CI.
  3. Lee Morris 2017-06-19

    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.v20170609091155 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source