Skip to content

Commit

Permalink
Add close of fab on fab-list click
Browse files Browse the repository at this point in the history
  • Loading branch information
mictro committed Sep 9, 2022
1 parent 287254e commit 3c6cc92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
<ion-fab-button [disabled]="disabled" [attr.disabled]="disabled ? true : null" tabindex="-1">
<ng-content select="kirby-icon"></ng-content>
</ion-fab-button>
<ion-fab-list *ngIf="actionSheet" side="top" class="{{ horizontalAlignment }}">
<ion-fab-list
*ngIf="actionSheet"
side="top"
class="{{ horizontalAlignment }}"
(click)="onFabListClick(fab)"
>
<ng-content select="kirby-action-sheet"></ng-content>
</ion-fab-list>
</ion-fab>
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ export class FabSheetComponent implements AfterContentInit {
// Postpone backdrop visibility update to allow for animation of opacity
setTimeout(() => {
this._isBackdropVisible = this.isFabSheetOpen;
this.changeDetectorRef.markForCheck();
});
}

onFabListClick(fab: IonFab) {
fab.close();
}
}

0 comments on commit 3c6cc92

Please sign in to comment.