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'
4747export class ModalComponent implements OnInit , OnDestroy {
4848
4949 static ngAcceptInputType_scrollable : BooleanInput ;
50+ static ngAcceptInputType_visible : BooleanInput ;
5051
5152 constructor (
5253 @Inject ( DOCUMENT ) private document : any ,
@@ -120,11 +121,14 @@ export class ModalComponent implements OnInit, OnDestroy {
120121 * @type boolean
121122 */
122123 @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+ }
128132 }
129133 get visible ( ) : boolean {
130134 return this . _visible ;
You can’t perform that action at this time.
0 commit comments