title: How to focus ion-searchbar on button click
body: <p>I am trying to focus <code>ion-searchbar</code> on button click but it is not working. 
  This is my code</p>
  
  <p><strong>Typescript</strong></p>
  
  <pre><code>@ViewChild('search') search:ElementRef;
  
  focusButton(){
         console.log(this.search);   //Searchbar {_config: Config, _elementRef: ElementRef, _renderer: RendererAdapter, _componentName: "searchbar", _mode: "md", …}
         console.log(this.search.nativeElement); //  null
         this.search.nativeElement.focus();      //  Cannot read property 'focus' of undefined
          this.search.nativeElement.setFocus();      // Cannot read property 'setFocus' of undefined
  
  }
  </code></pre>
  
  <p><strong>Html</strong></p>
  
  <pre><code>&lt;ion-searchbar #search (ionCancel)="cancelSearch($event)" [showCancelButton]="true" [(ngModel)]="artists"&gt;&lt;/ion-searchbar&gt;
          &lt;ion-buttons end&gt;
              &lt;button [hidden]="showSearch" (click)="(showSearch = !showSearch) &amp;&amp; focusButton()" ion-button icon-only&gt;
                &lt;ion-icon  name="search"&gt;&lt;/ion-icon&gt;
              &lt;/button&gt;
          &lt;/ion-buttons&gt;
  </code></pre>
  
  <p>The console output is above in comments with code.</p>