@@ -10,6 +10,7 @@ import {
1010import { startWith , switchMap } from 'rxjs/operators' ;
1111import { merge } from 'rxjs' ;
1212import { MdbAccordionItemComponent } from './accordion-item.component' ;
13+ import { BooleanInput , coerceBooleanProperty } from '@angular/cdk/coercion' ;
1314
1415@Component ( {
1516 selector : 'mdb-accordion' ,
@@ -19,8 +20,23 @@ import { MdbAccordionItemComponent } from './accordion-item.component';
1920export class MdbAccordionComponent implements AfterContentInit {
2021 @ContentChildren ( MdbAccordionItemComponent ) items : QueryList < MdbAccordionItemComponent > ;
2122
22- @Input ( ) flush = false ;
23- @Input ( ) multiple = false ;
23+ @Input ( )
24+ get flush ( ) : boolean {
25+ return this . _flush ;
26+ }
27+ set flush ( value : boolean ) {
28+ this . _flush = coerceBooleanProperty ( value ) ;
29+ }
30+ private _flush = false ;
31+
32+ @Input ( )
33+ get multiple ( ) : boolean {
34+ return this . _multiple ;
35+ }
36+ set multiple ( value : boolean ) {
37+ this . _multiple = coerceBooleanProperty ( value ) ;
38+ }
39+ private _multiple = false ;
2440
2541 @HostBinding ( 'class.accordion' ) accordion = true ;
2642 @HostBinding ( 'class.accordion-flush' )
@@ -52,4 +68,7 @@ export class MdbAccordionComponent implements AfterContentInit {
5268 itemsToClose . forEach ( ( item : MdbAccordionItemComponent ) => item . hide ( ) ) ;
5369 }
5470 }
71+
72+ static ngAcceptInputType_flush : BooleanInput ;
73+ static ngAcceptInputType_multiple : BooleanInput ;
5574}
0 commit comments