Problem
On Android, filtering a table displays all the headers, even though some contain no rows. It should only display the headers of the matching table rows.
This works correctly on iOS - see the attached screenshots which show the difference between the two platforms.
Testcase
Write "a" in the searchbar and you'll also see the "b" and "c" headers, even though they don't have any items.
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var table = Ti.UI.createTableView({
search: Ti.UI.createSearchBar(),
filterAttribute:'title',
filterCaseInsensitive:true,
data: [
{
title: 'a',
header: 'a'
},
{
title: 'b',
header: 'b'
},
{
title: 'c',
header: 'c'
}
]
});
win.add(table);
win.open();
Sindre Thanks for raising this ticket. In order for me to escalate it to the core team, all the fields must be complete. Please check it against the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist), and add any missing information. A test case must be included, and run without modification, as per the [Creating a Test Case](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase) section. I will mark this resolved for now. Please reopen it once it is complete, and I will move it to the main project. Cheers
Added testcase. Please reopen.
PR:- https://github.com/appcelerator/titanium_mobile/pull/4523
new PR : https://github.com/appcelerator/titanium_mobile/pull/4764
create new PR :- https://github.com/appcelerator/titanium_mobile/pull/5353