@@ -51,9 +51,7 @@ export class BsDropdownDirective implements OnInit, OnDestroy {
5151 */
5252 @Input ( )
5353 set autoClose ( value : boolean ) {
54- if ( typeof value === 'boolean' ) {
55- this . _state . autoClose = value ;
56- }
54+ this . _state . autoClose = value ;
5755 }
5856
5957 get autoClose ( ) : boolean {
@@ -135,6 +133,9 @@ export class BsDropdownDirective implements OnInit, OnDestroy {
135133 private _cis : ComponentLoaderFactory ,
136134 private _config : BsDropdownConfig ,
137135 private _state : BsDropdownState ) {
136+ // set initial dropdown state from config
137+ this . _state . autoClose = this . _config . autoClose ;
138+
138139 // create dropdown component loader
139140 this . _dropdown = this . _cis
140141 . createLoader < BsDropdownContainerComponent > (
@@ -148,8 +149,6 @@ export class BsDropdownDirective implements OnInit, OnDestroy {
148149 this . onHidden = this . _dropdown . onHidden ;
149150 this . isOpenChange = this . _state . isOpenChange ;
150151
151- // set initial dropdown state from config
152- this . _state . autoClose = this . _config . autoClose ;
153152 }
154153
155154 ngOnInit ( ) : void {
@@ -163,6 +162,8 @@ export class BsDropdownDirective implements OnInit, OnDestroy {
163162
164163 // attach DOM listeners
165164 this . _dropdown . listen ( {
165+ // because of dropdown inline mode
166+ outsideClick : false ,
166167 triggers : this . triggers ,
167168 show : ( ) => this . show ( )
168169 } ) ;
0 commit comments