[TIMOB-2974] iPhone row label highlightedColor stuck after search mode table row click
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-27T15:43:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-33, Release 1.8.0 |
Components | iOS |
Labels | n/a |
Reporter | Tommy |
Assignee | Blain Hamon |
Created | 2011-04-15T03:33:59.000+0000 |
Updated | 2011-10-27T15:43:14.000+0000 |
Description
When using labels in table rows, if the row is clicked while table is in searchMode, the row retains the row highlightedColor.
Reproduce by modifying Kitchen Sink table_view_api_search.js as follows:
var win = Titanium.UI.currentWindow;
// create table view data object
var data = [];
data[0] = Ti.UI.createTableViewRow({hasChild:true});
data[1] = Ti.UI.createTableViewRow({hasDetail:true});
data[2] = Ti.UI.createTableViewRow({hasCheck:true});
data[3] = Ti.UI.createTableViewRow({});
for (var i=0; i < data.length; i++) {
data[i].add(Ti.UI.createLabel({
text:'foo',
height:30,
highlightedColor:'red'
}));
data[i].filter = 'foo';
};
var search = Titanium.UI.createSearchBar({
barColor:'#385292',
showCancel:false,
hintText:'search'
});
search.addEventListener('change', function(e)
{
e.value; // search string as user types
});
search.addEventListener('return', function(e)
{
search.blur();
});
search.addEventListener('cancel', function(e)
{
search.blur();
});
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
search:search,
searchHidden:true,
filterAttribute:'filter'
});
// create table view event listener
tableview.addEventListener('click', function(e)
{
// event data
var index = e.index;
var section = e.section;
var row = e.row;
var rowdata = e.rowData;
Titanium.UI.createAlertDialog({title:'Table View',message:'row ' + row + ' index ' + index + ' section ' + section + ' row data ' + rowdata}).show();
});
var hide = Titanium.UI.createButtonBar({
labels:['Hide', 'Show'],
backgroundColor:'#336699',
height:25,
width:120
});
// add table view to the window
win.add(tableview);
hide.addEventListener('click', function(e)
{
Ti.API.info("search hidden = "+tableview.searchHidden);
if (e.index == 0)
{
tableview.searchHidden = true;
}
else if (e.index == 1)
{
tableview.scrollToTop(0,{animated:true});
}
});
if (Titanium.Platform.name == 'iPhone OS') {
win.setRightNavButton(hide);
}
This problem is still present in 1.6.
A helpdesk customer just pointed out this issue to me. It persists in Ti SDK 1.7.3 (v20110801092156.67ae819) Helpdesk Ticket: APP-155327
Tested On: Mac OSX Lion TiMob: 1.8.0.v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone 4 version 4.2.10 iPad2 version 4.3.5 iPod 3