File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
projects/coreui-angular/src/lib/modal/modal Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import { ModalContentComponent } from '../modal-content/modal-content.component'
47
47
export class ModalComponent implements OnInit , OnDestroy {
48
48
49
49
static ngAcceptInputType_scrollable : BooleanInput ;
50
+ static ngAcceptInputType_visible : BooleanInput ;
50
51
51
52
constructor (
52
53
@Inject ( DOCUMENT ) private document : any ,
@@ -120,11 +121,14 @@ export class ModalComponent implements OnInit, OnDestroy {
120
121
* @type boolean
121
122
*/
122
123
@Input ( )
123
- set visible ( visible : boolean ) {
124
- this . _visible = visible ;
125
- this . setBackdrop ( this . backdrop !== false && visible ) ;
126
- this . setBodyStyles ( visible ) ;
127
- this . visibleChange . emit ( visible ) ;
124
+ set visible ( value : boolean ) {
125
+ const newValue = coerceBooleanProperty ( value ) ;
126
+ if ( this . _visible !== newValue ) {
127
+ this . _visible = newValue ;
128
+ this . setBackdrop ( this . backdrop !== false && newValue ) ;
129
+ this . setBodyStyles ( newValue ) ;
130
+ this . visibleChange . emit ( newValue ) ;
131
+ }
128
132
}
129
133
get visible ( ) : boolean {
130
134
return this . _visible ;
You can’t perform that action at this time.
0 commit comments