[TIMOB-5045] iOS: Boolean property allowsSelection in tableView has three variants of work.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-21T21:57:24.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Misha Vasko |
Assignee | Ingo Muschenetz |
Created | 2011-08-18T07:20:28.000+0000 |
Updated | 2017-06-21T21:57:24.000+0000 |
Description
Boolean property allowsSelection in tableView has three variants of work.
Here i describe different behaviors of the allowsSelection property of the tableView object:
1. tableView.allowsSelection = false
Behavior: ros stays deselected when clicking against the row.
2. tableView.allowsSelection = true
Behavior: row becomes selected when clicking against the row. Row stays selected when mouseup.
3. tableView.allowsSelection is undefined in the code of project
Behavior: row becomes selected when clicking against the row. Row becomes deselected when mouseup.
It's look strange that boolean property defines three different behaviors.
Example:
// create table view data object
var data = [
{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff'},
{title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff'},
{title:'Row 3', hasCheck:true, color:'blue', selectedColor:'#fff'},
{title:'Row 4', color:'orange', selectedColor:'#fff'}
];
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
allowsSelection:true
});
tableview.selectRow(3);
// add table view to the window
Titanium.UI.currentWindow.add(tableview);
I think items #2 and #3 are the problem. One appears to be a sticky row state and the other just a click.
Closing ticket due to time passed and lack of progress for a number of years. Any problems, please file a new ticket.