diff --git a/src/components/toast/test/basic/index.ts b/src/components/toast/test/basic/index.ts index 8a3b4bb90be..dcfe8abd2b0 100644 --- a/src/components/toast/test/basic/index.ts +++ b/src/components/toast/test/basic/index.ts @@ -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(() => { @@ -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); diff --git a/src/components/toast/toast.ts b/src/components/toast/toast.ts index 650b3f4dec3..77e3d320e09 100644 --- a/src/components/toast/toast.ts +++ b/src/components/toast/toast.ts @@ -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); @@ -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. @@ -213,7 +211,6 @@ export interface ToastOptions { duration?: number; showCloseButton?: boolean; closeButtonText?: string; - enableBackdropDismiss?: boolean; dismissOnPageChange?: boolean; }