diff --git a/src/ng-multiselect-dropdown/src/multiselect.component.ts b/src/ng-multiselect-dropdown/src/multiselect.component.ts index b6a27ef..61cf563 100644 --- a/src/ng-multiselect-dropdown/src/multiselect.component.ts +++ b/src/ng-multiselect-dropdown/src/multiselect.component.ts @@ -89,6 +89,10 @@ export class MultiSelectComponent implements ControlValueAccessor { @Output("onFilterChange") onFilterChange: EventEmitter = new EventEmitter(); + + @Output("onDropDownOpen") + onDropDownOpen: EventEmitter = new EventEmitter(); + @Output("onDropDownClose") onDropDownClose: EventEmitter = new EventEmitter(); @@ -294,8 +298,10 @@ export class MultiSelectComponent implements ControlValueAccessor { return; } this._settings.defaultOpen = !this._settings.defaultOpen; - if (!this._settings.defaultOpen) { - this.onDropDownClose.emit(); + if (this._settings.defaultOpen) { + this.onDropDownOpen.emit(); + } else { + this.onDropDownClose.emit(); } }