Multiple selection not working in ion-select


#1

i am using the following code but it is not showing checked items

<ion-item>
<ion-label>Toppings</ion-label>
<ion-select [(ngModel)]="toppings" multiple="true" cancelText="Nah" okText="Okay!">
  <ion-option value="bacon" checked="true">Bacon</ion-option>
  <ion-option value="olives">Black Olives</ion-option>
  <ion-option value="xcheese" checked="true">Extra Cheese</ion-option>
  <ion-option value="peppers">Green Peppers</ion-option>
  <ion-option value="mushrooms">Mushrooms</ion-option>
  <ion-option value="onions">Onions</ion-option>
  <ion-option value="pepperoni">Pepperoni</ion-option>
  <ion-option value="pineapple">Pineapple</ion-option>
  <ion-option value="sausage">Sausage</ion-option>
  <ion-option value="Spinach">Spinach</ion-option>
</ion-select>
  </ion-item>

can anyone suggest how to solve this?


#2

Did you ever figure this out? I’m running into the same problem with a dynamic form but its just not showing any selected items.


#3

No, unfortunately…i used Modals instead of ion-select