Skip to content

Commit

Permalink
fix(toast): remove the enableBackdropDismiss option on toast
Browse files Browse the repository at this point in the history
references #6291
  • Loading branch information
brandyscarney committed May 20, 2016
1 parent aed4fad commit aeeae3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/components/toast/test/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ class E2EPage {

showToast() {
const toast = Toast.create({
message: 'User was created successfully',
showCloseButton: true,
enableBackdropDismiss: false
message: 'User was created successfully'
});

toast.onDismiss(() => {
Expand All @@ -37,11 +35,16 @@ class E2EPage {
setTimeout(() => {
this.nav.push(AnotherPage);
}, 1000);

setTimeout(() => {
toast.dismiss();
}, 2000);
}

showLongToast() {
const toast = Toast.create({
message: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea voluptatibus quibusdam eum nihil optio, ullam accusamus magni, nobis suscipit reprehenderit, sequi quam amet impedit. Accusamus dolorem voluptates laborum dolor obcaecati.',
duration: 5000
});

toast.onDismiss(this.dismissHandler);
Expand Down
3 changes: 0 additions & 3 deletions src/components/toast/toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import {ViewController} from '../nav/view-controller';
export class Toast extends ViewController {

constructor(opts: ToastOptions = {}) {
opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
opts.dismissOnPageChange = isPresent(opts.dismissOnPageChange) ? !!opts.dismissOnPageChange : false;

super(ToastCmp, opts);
Expand Down Expand Up @@ -104,7 +103,6 @@ export class Toast extends ViewController {
* | cssClass | `string` | - | Any additional class for custom styles. |
* | showCloseButton | `boolean` | false | Whether or not to show a button to close the toast. |
* | closeButtonText | `string` | "Close" | Text to display in the close button. |
* | enableBackdropDismiss | `boolean` | true | Whether the toast should be dismissed by tapping the backdrop. |
* | dismissOnPageChange | `boolean` | false | Whether to dismiss the toast when navigating to a new page. |
*
* @param {object} opts Toast options. See the above table for available options.
Expand Down Expand Up @@ -213,7 +211,6 @@ export interface ToastOptions {
duration?: number;
showCloseButton?: boolean;
closeButtonText?: string;
enableBackdropDismiss?: boolean;
dismissOnPageChange?: boolean;
}

Expand Down

0 comments on commit aeeae3f

Please sign in to comment.