Skip to content

Commit aeeae3f

Browse files
committed
fix(toast): remove the enableBackdropDismiss option on toast
references #6291
1 parent aed4fad commit aeeae3f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/toast/test/basic/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ class E2EPage {
2323

2424
showToast() {
2525
const toast = Toast.create({
26-
message: 'User was created successfully',
27-
showCloseButton: true,
28-
enableBackdropDismiss: false
26+
message: 'User was created successfully'
2927
});
3028

3129
toast.onDismiss(() => {
@@ -37,11 +35,16 @@ class E2EPage {
3735
setTimeout(() => {
3836
this.nav.push(AnotherPage);
3937
}, 1000);
38+
39+
setTimeout(() => {
40+
toast.dismiss();
41+
}, 2000);
4042
}
4143

4244
showLongToast() {
4345
const toast = Toast.create({
4446
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.',
47+
duration: 5000
4548
});
4649

4750
toast.onDismiss(this.dismissHandler);

src/components/toast/toast.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ import {ViewController} from '../nav/view-controller';
6262
export class Toast extends ViewController {
6363

6464
constructor(opts: ToastOptions = {}) {
65-
opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
6665
opts.dismissOnPageChange = isPresent(opts.dismissOnPageChange) ? !!opts.dismissOnPageChange : false;
6766

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

0 commit comments

Comments
 (0)