I have a multiple select.
How I can implement the reset button for the select and show the blank value?
<ion-item>
<ion-label>
<i class="fa fa-tags" aria-hidden="true"></i>{{'Categories' | translate}}</ion-label>
<ion-select [(ngModel)]="categories" multiple="true" (ionCancel)="allClickedCategories()" [okText]="('Select' | translate)"
[cancelText]="('Select All' | translate)" [selectOptions]="selectOptions">
<ion-option *ngFor="let item of categoriesitems" value="{{item.name}}">{{item.name | translate}}</ion-option>
</ion-select>
</ion-item>
<ion-col col-6 class="center">
<button ion-button (click)="buttonReset()">Reset</button>
</ion-col>
<ion-col col-6 class="center">
<button ion-button (click)="buttonClicked()">{{'Search' | translate}}</button>
</ion-col>
I try to implement the button reset with the code below: in the select i see the value but the array is empty
buttonReset() {
this.categories = [];
}
Thank You