I’m trying to implement the select All in ion-select,
So I need to capture the select and unselect event for ion-option ,
I implemented the select all by using ionSelect event , but i’m still trying to implement unselect all:
<form [formGroup]="addserviceForm">
<ion-select formControlName='areacover' multiple="true">
<ion-option value="All" (ionSelect)="selectAll()" >select All </ion-option>
<ion-option *ngFor='let district of districtlist' [value]="district.nameen">{{district.namear}} </ion-option>
</ion-select>
</form>
selectAll(){
this.addserviceForm.get(‘areacover’).setValue(this.districtlisten);
}
Also , I need to load the select in option in full screen, I tried to set width as 100% but it doesn’t work.