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

iOS: SearchBar doesn't show Bookmark button when set on creation in TableView

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0
    • Fix Version/s: Release 7.5.0
    • Component/s: iOS
    • Labels:
    • Environment:

      MacOS 10.13.3 (17D47)
      Studio 5.0.0.201712081732
      Ti SDK 7.1.0.v20180302141418
      Appc NPM 4.2.12
      Appc CLI 7.0.2
      Alloy 1.11.0
      Xcode 9.2 (9C40b)

    • Story Points:
      0
    • Sprint:
      2016 Sprint 17 SDK

      Description

      When showBookmark is set to true on creation of the searchbar and it is in a TableView, the bookmark button does not show.

      Steps to reproduce issue
      1. Create a new project with the below code
      2. Run the project

      Expected Results
      The searchbar has the bookmark button shown

      Actual Results
      The searchbar does not have the bookmark button shown

      Notes
      The bookmark button can be toggled to show it, but the toggle has to be tapped twice, since it thinks it is being shown.
      Also, if you just create a searchbar with showBookmark = true, then the button will show. Having the searchbar in the tableview does not show the bookmark button.

      Code
      Classic:

      var win = Ti.UI.createWindow();
       
      var searchBar = Titanium.UI.createSearchBar({
          showBookmark: true
      });
       
      var table = Ti.UI.createTableView({
          data: [{
              title: "Toggle Bookmark button"
          }],
          search: searchBar
      });
       
      table.addEventListener('click', function(e){
      	searchBar.showBookmark = !searchBar.showBookmark;
      });
       
      win.add(table);
      win.open();
      

      Alloy:
      index.xml

      <Alloy>
        <Window>
          <TableView>
            <SearchBar id="search" showBookmark="true"/>
            <TableViewRow onClick="toggle" title="Toggle bookmark button"/>
          </TableView>
        </Window>
      </Alloy>
      

      index.js:

      function toggle() {
      	$.search.showBookmark = !$.search.showBookmark;
      }
       
      $.index.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                ewieber Eric Wieber
                Reviewer:
                Hans Knöchel
                Tester:
                Samir Mohammed
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code