Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26913

iOS: New SearchBar property "showSearchBarInNavBar" does not work with custom item templates

    Details

    • Story Points:
      3
    • Sprint:
      2021 Sprint 4, 2021 Sprint 10

      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();
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Christopher Williams
              Tester:
              Samir Mohammed
            • Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-21105
                  Sync status:
                  PENDING
                  Last received:
                  Last sent:

                  Git Integration