Ion-select with "select all" option

I tried doing this:

<ion-item>
  <ion-label>Categories</ion-label>
  <ion-select [(ngModel)]="categories" multiple="true">
    <ion-option (ionSelect)="allClicked()">select/deselect all</option>
    <ion-option *ngFor="let item of categoriesitems" value="{{item.id}}">{{item.name}}</ion-option>
  </ion-select>

It renders the all option but the allClicked() event triggers only when setting the option, and not when you toggle it off. In addition, when I get into the allClicked() handler, there doesn’t seem to be a way to control the selection of the rest of the options.