I want to filter ion-select on my project using ionChange, the case is like this picture. when ion-select “Klinik Tujuan” is selected that will be filter the array values on ion-select “Dokter”.
here I’m using PHP API to get the data array.
<ion-card style="height: auto">
<ion-item class="klinik">
<ion-label floating>Klinik Tujuan</ion-label>
<ion-select [(ngModel)]="userData.unit" interface="action-sheet">
<ion-option class="select" *ngFor="let k of kliniks" value="{{k.id}}">{{k.nama}}</ion-option>
</ion-select>
</ion-item>
<ion-item class="klinik">
<ion-label floating>Tanggal Periksa</ion-label>
<ion-datetime displayFormat="DD-MM-YYYY" [(ngModel)]="userData.tanggal" [min]="today()" [max]="maxDate"></ion-datetime>
</ion-item>
<ion-item class="klinik">
<ion-label floating>Dokter</ion-label>
<ion-select [(ngModel)]="userData.dokter" interface="action-sheet">
<ion-option *ngFor="let d of dokters" value="{{d.nama}}">
{{d.nama}}
</ion-option>
</ion-select>
</ion-item>
<ion-item>
<button color="secondary" ion-button (click)="daftar()" round block>
DAFTAR
</button>
<button color="danger" ion-button (click)="toAboutPage()" round block>
BATAL
</button>
</ion-item>
</ion-card>
is any one have the example?
thanks before.