From aeeae3f675f6ee4b2edb5520e931d140e80d9c4c Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 20 May 2016 16:50:04 -0400 Subject: [PATCH] fix(toast): remove the enableBackdropDismiss option on toast references #6291 --- src/components/toast/test/basic/index.ts | 9 ++++++--- src/components/toast/toast.ts | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) 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; }