我试图覆盖传递[selectOptions]的多选组件上的OK按钮的行为。标题和副标题被覆盖,但忽略按钮和enableBackdropDismiss设置。
有人可以帮忙吗?提前致谢。
<ion-item>
<ion-label>Select roads</ion-label>
<ion-select [(ngModel)]="selectedRoads" multiple="true" [selectOptions]="selectOptions">
<ion-option *ngFor="let road of roads">{{road.description}}</ion-option>
</ion-select>
</ion-item>
this.selectOptions = {
title: 'Pizza Toppings',
subTitle: 'Select your toppings',
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
},
{
text: 'Buy',
handler: () => {
console.log('Buy clicked');
}
}
],
enableBackdropDismiss:true
};