feat(select): add event for when overlay is dismissed (#24099)

This commit is contained in:
Hans Krywalsky
2021-12-14 15:39:25 +01:00
committed by GitHub
parent 03dd372933
commit c1ecf94e4e
7 changed files with 38 additions and 7 deletions

View File

@ -107,6 +107,11 @@ export class Select implements ComponentInterface {
*/
@Event() ionCancel!: EventEmitter<void>;
/**
* Emitted when the overlay is dismissed.
*/
@Event() ionDismiss!: EventEmitter<void>;
/**
* Emitted when the select has focus.
*/
@ -176,6 +181,7 @@ export class Select implements ComponentInterface {
overlay.onDidDismiss().then(() => {
this.overlay = undefined;
this.isExpanded = false;
this.ionDismiss.emit();
this.setFocus();
});