[TIMOB-26913] iOS: New SearchBar property "showSearchBarInNavBar" does not work with custom item templates
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-05-18T18:20:20.000+0000 |
Affected Version/s | Release 8.3.1 |
Fix Version/s | Release 10.0.0, Release 9.3.3 |
Components | iOS |
Labels | ListView, SearchBar, engSchedule, iOS |
Reporter | Hans Knöchel |
Assignee | Vijay Singh |
Created | 2019-03-19T08:49:59.000+0000 |
Updated | 2021-05-18T18:20:23.000+0000 |
Description
When using custom item templates in listviews, the
showSearchBarInNavBar
property does not work:
var win = Ti.UI.createWindow({ title: 'Sub Window' });
var nav = Ti.UI.createNavigationWindow({ window: win });
var search = Ti.UI.createSearchBar();
var myTemplate = {
childTemplates: [
{
type: 'Ti.UI.Label',
bindId: 'label',
properties: {
color: 'green',
left: 30
}
}
]
};
var listView = Ti.UI.createListView({ searchView: search, templates: { 'default': myTemplate }, defaultItemTemplate: 'default', showSearchBarInNavBar: true });
listView.sections = [
Ti.UI.createListSection({
items: [
{
properties: {
height: 43
},
label: {
text: 'Hello world!'
}
}
]
})
];
win.add(listView);
nav.open();
Is there a progress on this [~vijaysingh]? I hope you guys can reproduce it.
Any update? This needs to be escalated - it doesn't even work for built-in templates anymore.
One year later and this is still open. Can someone please verify this?
doing some pressure here. I think this should be addressed as it's a huge UI bug
It's likely just a small adjustment. Maybe I can try to take a look in January.
What do you mean? I reported the ticket - but it is stale and has not been assigned to a developer so far.
You said you'd take a look in January, just wondering if you had done so
Oh okay, sorry! No I haven't has the chance to.
[~hknoechel], I'll assign it.
PR - https://github.com/appcelerator/titanium_mobile/pull/12486
FR Passed, waiting on Jenkins build.
merged to master for 10.0.0 target, backport merged to 9_3_X branch as well.