-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Action sheet adapt to newest CDK (#3733)
* fix: Action sheet functionality * fix typo
- Loading branch information
1 parent
7146b6c
commit 7b353e8
Showing
8 changed files
with
121 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/core/src/lib/action-sheet/action-sheet-mobile/action-sheet-mobile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div *ngIf="open" class="fd-action-sheet__wrapper fd-action-sheet__wrapper--active" (click)="close()"> | ||
<div *ngIf="open" class="fd-action-sheet__wrapper fd-action-sheet__wrapper--active" (click)="toggleOpenState(false)"> | ||
<ng-container *ngTemplateOutlet="childContent?.actionSheetBodyTemplate"></ng-container> | ||
</div> |
20 changes: 10 additions & 10 deletions
20
libs/core/src/lib/action-sheet/action-sheet-mobile/action-sheet-mobile.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { | ||
Component, | ||
Input, | ||
TemplateRef | ||
} from '@angular/core'; | ||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, TemplateRef } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'fd-action-sheet-mobile', | ||
templateUrl: './action-sheet-mobile.component.html' | ||
templateUrl: './action-sheet-mobile.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class ActionSheetMobileComponent { | ||
|
||
/** Whenever links should be visible **/ | ||
@Input() | ||
open = false; | ||
|
||
/** @hidden */ | ||
childContent: { | ||
actionSheetBodyTemplate: TemplateRef<any>, | ||
} = null; | ||
|
||
/** @hidden */ | ||
close(): void { | ||
this.open = false; | ||
constructor( | ||
private _changeDetectionRef: ChangeDetectorRef | ||
) {} | ||
|
||
toggleOpenState(isOpen: boolean): void { | ||
this.open = isOpen; | ||
this._changeDetectionRef.detectChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.