Change event on ion-select multiple OR two models in one select?


#1

I have the following code:

<ion-select [(ngModel)]="newFoo.fields" multiple>
    <ion-option *ngFor="let field of fieldStorage" [value]="field.id">{{ field.name }} - {{ field.category_name }}</ion-option>
</ion-select>

Where newFoo.fields is an array that’s storing the field.id from fieldStorage, that’s working fine. But I need another array to store all the field.category_names from selected options. I tried adding:

(change)=“category_list=fieldStorage.variety_name”

To the select, but that doesn’t seem to do a thing.


Change event on ion-select multiple?
#2

if you are using ionic beta 8 or above then the name of event is (ionChange)
or If fieldStorage is not a big array, Once all the selection is done you can try and find it from the array


#3

Using (ionChange) now, doesn’t seem to be working.


#4

Same issue. (ionChange) is not working with ion-select multiple… Any solution?