Skip to content

Commit

Permalink
add support for klp-select to listen to close events
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter-willems committed Jul 19, 2023
1 parent 8128a41 commit d598a55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion projects/klippa/ngx-enhancy-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@klippa/ngx-enhancy-forms",
"version": "14.1.7",
"version": "14.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
[virtualScroll]="true"
(scroll)="onScroll($event.end)"
(open)="onOpen()"
(close)="onClose()"
>
<ng-template let-item="item" ng-option-tmp>
<ng-container *ngIf="customOptionTpl" [ngTemplateOutlet]="customOptionTpl" [ngTemplateOutletContext]="{item: item}"></ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class SelectComponent extends ValueAccessorBase<string | string[]> implem
@Output() public onSearch = new EventEmitter<string>();
@Output() public onEndReached = new EventEmitter<void>();
@Output() public onOpened = new EventEmitter<void>();
@Output() public onClosed = new EventEmitter<void>();
@Output() public onBlur = new EventEmitter<void>();
@Output() public onClear = new EventEmitter<void>();
@ViewChild('ngSelect') ngSelect;
Expand Down Expand Up @@ -182,4 +183,8 @@ export class SelectComponent extends ValueAccessorBase<string | string[]> implem
public focus = (): void => {
this.ngSelect.focus();
}

public onClose(): void {
this.onClosed.emit();
}
}

0 comments on commit d598a55

Please sign in to comment.