[TIMOB-5658] MobileWeb: Method deselectRow does not work in tableView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-31T05:24:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Misha Vasko |
Assignee | Maxim Negadaylov |
Created | 2011-05-31T05:13:47.000+0000 |
Updated | 2017-03-09T20:50:11.000+0000 |
Description
Selected row in the tableView is not deselected by method deselectRow.
var win = Ti.UI.currentWindow;
var tableView = Ti.UI.createTableView({
width: 300,
height: 200,
top: 90,
left: 10,
backgroundColor: '#00ACDC'
});
var addRow = Ti.UI.createButton({
title: 'addRow',
width: 50,
top:0,
left: 0,
heigth: 30
});
var delRow = Ti.UI.createButton({
title: 'delRow',
width: 50,
top:0,
heigth: 30,
left: 50
});
var selRow = Ti.UI.createButton({
title: 'selRow',
width: 50,
top:0,
heigth: 30,
left: 100
});
var deselRow = Ti.UI.createButton({
title: 'deSelRow',
width: 50,
top:0,
heigth: 30,
left: 150
});
var insAftRow = Ti.UI.createButton({
title: 'insAfter',
width: 50,
top:30,
heigth: 30,
left: 0
});
var insBefRow = Ti.UI.createButton({
title: 'insBefor',
width: 50,
heigth: 30,
top:30,
left: 50
});
var label1 = Ti.UI.createLabel({
top: 60,
left: 5,
text: 'Row #:'
});
var tf1= Ti.UI.createTextField({
width: 50,
height: 30,
top:60,
left: 80
});
win.add(tableView);
win.add(addRow);
win.add(delRow);
win.add(selRow);
win.add(deselRow);
win.add(insAftRow);
win.add(insBefRow);
win.add(tf1);
win.add(label1);
var i = 0;
var newRow = function (){
row = Ti.UI.createTableViewRow({
title: 'This is ' + i + ' row'
});
i++;
};
addRow.addEventListener('click', function(){
newRow();
tableView.appendRow(row);
});
delRow.addEventListener('click', function(){
tableView.deleteRow(tf1.value);
});
selRow.addEventListener('click', function(){
tableView.selectRow(tf1.value);
});
deselRow.addEventListener('click', function(){
tableView.deselectRow(tf1.value);
});
insAftRow.addEventListener('click', function(){
newRow();
tableView.insertRowAfter(tf1.value, row);
});
insBefRow.addEventListener('click', function(){
newRow();
tableView.insertRowBefore(tf1.value, row);
});
Closing ticket as fixed.