File tree Expand file tree Collapse file tree 5 files changed +13
-2
lines changed Expand file tree Collapse file tree 5 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ <h2>Configure your dialog</h2>
57
57
< label > Close Button</ label >
58
58
< input type ="checkbox " formControlName ="closeButton " />
59
59
</ div >
60
+ < div >
61
+ < label > Overflow ❌</ label >
62
+ < input type ="checkbox " formControlName ="overflow " />
63
+ </ div >
60
64
< ng-container formGroupName ="enableClose ">
61
65
< div >
62
66
< label > Escape to Close ❌</ label >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ button {
24
24
}
25
25
26
26
form {
27
- max-height : 260 px ;
27
+ max-height : 300 px ;
28
28
display : flex ;
29
29
flex-direction : column ;
30
30
flex-wrap : wrap ;
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export class AppComponent {
37
37
backdrop : [ true ] ,
38
38
resizable : [ false ] ,
39
39
draggable : [ false ] ,
40
+ overflow : [ true ] ,
40
41
dragConstraint : [ 'none' ] ,
41
42
size : [ '' ] ,
42
43
windowClass : [ '' ] ,
@@ -76,6 +77,9 @@ export class AppComponent {
76
77
this . backDropClicked = false ;
77
78
this . cleanConfig = this . normalizeConfig ( config ) ;
78
79
80
+ if ( this . cleanConfig . overflow ) document . body . classList . add ( 'overflow' ) ;
81
+ else document . body . classList . remove ( 'overflow' ) ;
82
+
79
83
const ref = this . dialog . open ( compOrTemplate as any , this . cleanConfig ) ;
80
84
81
85
ref ?. backdropClick$ . subscribe ( {
Original file line number Diff line number Diff line change 3
3
flex-direction : column ;
4
4
overflow : hidden ;
5
5
position : relative ;
6
+
6
7
@keyframes dialog-open {
7
8
0% {
8
9
transform : translateX (50px );
9
10
}
11
+
10
12
100% {
11
13
transform : none ;
12
14
}
97
99
}
98
100
}
99
101
100
- body .ngneat-dialog-hidden {
102
+ body .ngneat-dialog-hidden :not ( .overflow ) {
101
103
overflow : hidden ;
102
104
}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export interface GlobalDialogConfig {
32
32
backdrop : CloseStrategy ;
33
33
} ;
34
34
resizable : boolean ;
35
+ overflow : boolean ;
35
36
width : string | number ;
36
37
minWidth : string | number ;
37
38
maxWidth : string | number ;
You can’t perform that action at this time.
0 commit comments