I'm new at Ionic2 and angular2.
I use ion-select plugin, and use multiple option. Is there any way to limit user selection, for example till three items?
you can use ionChange event in tempate:
<ion-select multiple="true" [(ngModel)]="selected_values" (ionChange)="onSelect()">
</ion-select>
in ts:
selected_values=[];
onSelect(){
if(this.selected_values.length==3){
//do somthing
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With