[TIMOB-15526] iOS: Tableview's search filter does not render results correctly in a Popover
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-06T18:17:55.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API, Release 3.2.3, Release 3.3.0 |
Components | iOS |
Labels | popover, qe-testadded, supportTeam |
Reporter | Tom Raggett |
Assignee | Vishal Duggal |
Created | 2013-10-17T08:40:09.000+0000 |
Updated | 2014-03-12T23:16:43.000+0000 |
Description
If I create a Popover containing a TableView with a SearchBar, when I filter the TableView by typing in the SearchBar, I see the (correct) filtered TableViewRows overlaid on the full unfiltered table. You can see this in the attached screenshot where Row 4 is at the top and the bottom of the display having typed 4 in the SearchBar.
This is visually bad, although the click behaviour is correct (you can click on the filtered rows only).
Work around is to use a separate SearchBar and populate the table based on change events. I would prefer that it just worked.
Test code has instructions to see the correct behaviour outside a Popover.
// Titanium SearchBar+TableView in Popover shows filtered items over all table items
var win = Titanium.UI.createWindow({backgroundColor:'white'});
var button1 = Titanium.UI.createButton({
title:'Show popover',
borderColor: 'black',
top: 40
});
win.add(button1);
var data = [];
data[0] = Ti.UI.createTableViewRow({title:'Row 1'});
data[1] = Ti.UI.createTableViewRow({title:'Row 2'});
data[2] = Ti.UI.createTableViewRow({title:'Row 3'});
data[3] = Ti.UI.createTableViewRow({title:'Row 4'});
var search = Ti.UI.createSearchBar({});
var table = Ti.UI.createTableView({
search: search,
data: data
});
var popover = Ti.UI.iPad.createPopover({});
popover.add(table);
button1.addEventListener('click', function(){
popover.show({view: button1});
// comment previous line and uncomment next two lines to see an ugly but correctly functioning table+search
//table.top = 40; //iOS7
//win.add(table);
});
win.open();
Attachments
File | Date | Size |
---|---|---|
sample_project.zip | 2014-02-14T22:02:01.000+0000 | 2553902 |
scr_shot1.png | 2014-02-14T22:02:01.000+0000 | 96779 |
scr_shot2.png | 2014-02-14T22:02:01.000+0000 | 104072 |
scr_shot3.png | 2014-02-14T22:02:01.000+0000 | 62982 |
Titanium Popover TableView SearchBar issue.png | 2013-10-17T08:40:09.000+0000 | 43517 |
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/5419
Backport to 3_2_X https://github.com/appcelerator/titanium_mobile/pull/5455
Tested and verified the fix with Appcelerator Studio, build: 3.2.1.201402061120 Titanium SDK, build: 3.2.3.v20140312130857 Device: iPad Air iOS version 7.1