Skip to content

Commit

Permalink
Added output "opened" to component (#546)
Browse files Browse the repository at this point in the history
Added new output "opened" that will be emitted every time the components options dropdown changes visibility
  • Loading branch information
hellivan authored and valorkin committed Dec 21, 2016
1 parent 77ddc89 commit f9750f4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export class SelectComponent implements OnInit {
@Output() public selected:EventEmitter<any> = new EventEmitter();
@Output() public removed:EventEmitter<any> = new EventEmitter();
@Output() public typed:EventEmitter<any> = new EventEmitter();
@Output() public opened:EventEmitter<any> = new EventEmitter();

public options:Array<SelectItem> = [];
public itemObjects:Array<SelectItem> = [];
Expand All @@ -308,8 +309,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<any> = [];
Expand Down

0 comments on commit f9750f4

Please sign in to comment.