From c6e308ee78761ff2088d35289e6c20070449afab Mon Sep 17 00:00:00 2001 From: Ivan Hell Date: Fri, 9 Dec 2016 10:33:48 +0100 Subject: [PATCH] Added output "opened" to component Added new output "opened" that will be emitted every time the components options dropdown changes visibility --- components/select/select.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/select/select.ts b/components/select/select.ts index 286dcfe3..3054507e 100755 --- a/components/select/select.ts +++ b/components/select/select.ts @@ -293,6 +293,7 @@ export class SelectComponent implements OnInit { @Output() public selected:EventEmitter = new EventEmitter(); @Output() public removed:EventEmitter = new EventEmitter(); @Output() public typed:EventEmitter = new EventEmitter(); + @Output() public opened:EventEmitter = new EventEmitter(); public options:Array = []; public itemObjects:Array = []; @@ -303,8 +304,17 @@ export class SelectComponent implements OnInit { return this._active; } + private set optionsOpened(value:boolean){ + this._optionsOpened = value; + this.opened.emit(value); + } + + private get optionsOpened(): boolean{ + return this._optionsOpened; + } + private inputMode:boolean = false; - private optionsOpened:boolean = false; + private _optionsOpened:boolean = false; private behavior:OptionsBehavior; private inputValue:string = ''; private _items:Array = [];