Skip to content

Commit

Permalink
fix(bal-modal): emit willDismiss and didDismiss in close method
Browse files Browse the repository at this point in the history
  • Loading branch information
mladenplaninicic committed Oct 27, 2022
1 parent 2349771 commit 9f4dc3c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ export class Modal implements OverlayInterface {
*/
@Method()
async close(): Promise<void> {
this.willDismiss.emit()
this.unsetModalActiveOnBody()
this.presented = false
this.didDismiss.emit()
}

/**
Expand Down Expand Up @@ -172,8 +174,6 @@ export class Modal implements OverlayInterface {
await this.close()
return true
}

this.willDismiss.emit({ data, role })
const dismissed = await dismiss(this, data, role, async () => {
writeTask(() => {
if (this.modalBackgroundElement) {
Expand Down

0 comments on commit 9f4dc3c

Please sign in to comment.