Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26913] iOS: New SearchBar property "showSearchBarInNavBar" does not work with custom item templates

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2021-05-18T18:20:20.000+0000
Affected Version/sRelease 8.3.1
Fix Version/sRelease 10.0.0, Release 9.3.3
ComponentsiOS
LabelsListView, SearchBar, engSchedule, iOS
ReporterHans Knöchel
AssigneeVijay Singh
Created2019-03-19T08:49:59.000+0000
Updated2021-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();

Comments

  1. Hans Knöchel 2019-06-16

    Is there a progress on this [~vijaysingh]? I hope you guys can reproduce it.
  2. Hans Knöchel 2019-11-24

    Any update? This needs to be escalated - it doesn't even work for built-in templates anymore.
  3. Hans Knöchel 2020-11-23

    One year later and this is still open. Can someone please verify this?
  4. Brian García 2020-12-02

    doing some pressure here. I think this should be addressed as it's a huge UI bug
  5. Hans Knöchel 2020-12-04

    It's likely just a small adjustment. Maybe I can try to take a look in January.
  6. Hans Knöchel 2021-02-19

    What do you mean? I reported the ticket - but it is stale and has not been assigned to a developer so far.
  7. Sohail Saddique 2021-02-19

    You said you'd take a look in January, just wondering if you had done so
  8. Hans Knöchel 2021-02-19

    Oh okay, sorry! No I haven't has the chance to.
  9. Abir Mukherjee 2021-02-19

    [~hknoechel], I'll assign it.
  10. Vijay Singh 2021-02-19

    PR - https://github.com/appcelerator/titanium_mobile/pull/12486
  11. Samir Mohammed 2021-02-23

    FR Passed, waiting on Jenkins build.
  12. Christopher Williams 2021-02-24

    merged to master for 10.0.0 target, backport merged to 9_3_X branch as well.

JSON Source