Skip to content

Commit

Permalink
fix(datetime): emit ioncancel event on backdrop click for datetime (#…
Browse files Browse the repository at this point in the history
…10532)

* fix(datetime): emit ioncancel event on backdrop click for datetime component

* fix(datetime): emit ioncancel event on backdrop click for datetime component - fix for all picker components instead of specifically for datetime
  • Loading branch information
topalavlad authored and manucorporat committed Apr 1, 2017
1 parent 979ca63 commit 4ac8ffb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/picker/picker-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ export class PickerCmp {

bdClick() {
if (this.enabled && this.d.enableBackdropDismiss) {
this.dismiss('backdrop');
let cancelBtn = this.d.buttons.find(b => b.role === 'cancel');
if (cancelBtn) {
this.btnClick(cancelBtn);
} else {
this.dismiss('backdrop');
}
}
}

Expand Down

0 comments on commit 4ac8ffb

Please sign in to comment.