Skip to content

Commit

Permalink
feat(angular): add no scroll input to dialog component (#592)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Sielemann <[email protected]>
  • Loading branch information
TimSielemann and Tim Sielemann authored Oct 23, 2024
1 parent c087c05 commit aa10da3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ng-content select="cat-dialog-header"></ng-content>
<cat-scrollable
<cat-scrollable *ngIf="!disableScrolling; else noScroll"
[noOverscroll]="noOverscroll"
[noScrolledInit]="noScrolledInit"
[scrolledBuffer]="scrolledBuffer"
Expand All @@ -9,4 +9,9 @@
<ng-content></ng-content>
</div>
</cat-scrollable>
<ng-template #noScroll>
<div class="cat-dialog-content">
<ng-content></ng-content>
</div>
</ng-template>
<ng-content select="cat-dialog-actions"></ng-content>
7 changes: 7 additions & 0 deletions angular/projects/catalyst/src/lib/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ import { CatDialogHeaderComponent } from './dialog-header.component';
}
})
export class CatDialogComponent implements AfterContentInit {

/**
* Flag to disable scrolling behavior of dialog content. Default is false. If set to true the
* using component is responsible for not overflowing the viewport.
*/
@Input() disableScrolling = false;

/**
* Flag to disable/enable overscroll behavior.
*/
Expand Down

0 comments on commit aa10da3

Please sign in to comment.