Ion-select with icon

Hi, @alejandrocao

Here is code to open ion select using header bar icon
Template file

<ion-header>
  <ion-navbar color="primary">
    <ion-title>Editor Picks</ion-title>

    <ion-buttons end>
      <button ion-button icon-only (click)="doFilter()">
          <ion-icon name="funnel"></ion-icon>
      </button>
   </ion-buttons>

  </ion-navbar>
</ion-header>

<ion-content>
  <ion-select #sectionSelect (ngModel)="selecteTopic"  (ionChange)="topicChange($event,selecteTopic)">
    <ion-option value="0" selected="true">Topics</ion-option>
    <ion-option *ngFor="let topiclist of allTopics" value="{{topiclist.term_id}}"   [innerHTML]="topiclist.taxonomy_term_data_name">
  </ion-option>
</ion-select>
</ion-content

component file

import { Component ,ViewChild } from '@angular/core';
....
  @ViewChild('sectionSelect') sectionSelect: Select;
....
doFilter(){
    this.sectionSelect.open();
    console.log('hello')
 }

Hope this will help you.
Thanks

3 Likes