diff --git a/core/src/components.d.ts b/core/src/components.d.ts index bcea90eeb2..a706eb8971 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -160,7 +160,7 @@ export namespace Components { /** * Dismiss the action sheet overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the action sheet. This can be useful in a button handler for determining which button was clicked to dismiss the action sheet. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * @param role The role of the element that is dismissing the action sheet. This can be useful in a button handler for determining which button was clicked to dismiss the action sheet. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** @@ -239,7 +239,7 @@ export namespace Components { /** * Dismiss the alert overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the alert. This can be useful in a button handler for determining which button was clicked to dismiss the alert. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * @param role The role of the element that is dismissing the alert. This can be useful in a button handler for determining which button was clicked to dismiss the alert. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** @@ -1527,7 +1527,7 @@ export namespace Components { /** * Dismiss the loading overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the loading. This can be useful in a button handler for determining which button was clicked to dismiss the loading. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * @param role The role of the element that is dismissing the loading. This can be useful in a button handler for determining which button was clicked to dismiss the loading. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** @@ -1720,7 +1720,7 @@ export namespace Components { /** * Dismiss the modal overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'. + * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** @@ -1973,7 +1973,7 @@ export namespace Components { /** * Dismiss the picker overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the picker. This can be useful in a button handler for determining which button was clicked to dismiss the picker. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * @param role The role of the element that is dismissing the picker. This can be useful in a button handler for determining which button was clicked to dismiss the picker. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** @@ -2110,7 +2110,7 @@ export namespace Components { * Dismiss the popover overlay after it has been presented. * @param data Any data to emit in the dismiss events. * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'. - * @param dismissParentPopover If `true`, dismissing this popover will also dismiss a parent popover if this popover is nested. Defaults to `true`. + * @param dismissParentPopover If `true`, dismissing this popover will also dismiss a parent popover if this popover is nested. Defaults to `true`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string, dismissParentPopover?: boolean) => Promise; /** @@ -3111,7 +3111,7 @@ export namespace Components { /** * Dismiss the toast overlay after it has been presented. * @param data Any data to emit in the dismiss events. - * @param role The role of the element that is dismissing the toast. This can be useful in a button handler for determining which button was clicked to dismiss the toast. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * @param role The role of the element that is dismissing the toast. This can be useful in a button handler for determining which button was clicked to dismiss the toast. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. This is a no-op if the overlay has not been presented yet. If you want to remove an overlay from the DOM that was never presented, use the [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ "dismiss": (data?: any, role?: string) => Promise; /** diff --git a/core/src/components/action-sheet/action-sheet.tsx b/core/src/components/action-sheet/action-sheet.tsx index 984e24cdaa..223f9cb665 100644 --- a/core/src/components/action-sheet/action-sheet.tsx +++ b/core/src/components/action-sheet/action-sheet.tsx @@ -216,6 +216,10 @@ export class ActionSheet implements ComponentInterface, OverlayInterface { * This can be useful in a button handler for determining which button was * clicked to dismiss the action sheet. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise { diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index 90a1c281bb..3d5a64200c 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -411,6 +411,10 @@ export class Alert implements ComponentInterface, OverlayInterface { * This can be useful in a button handler for determining which button was * clicked to dismiss the alert. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise { diff --git a/core/src/components/loading/loading.tsx b/core/src/components/loading/loading.tsx index 05e40669d9..ceb2ae62a3 100644 --- a/core/src/components/loading/loading.tsx +++ b/core/src/components/loading/loading.tsx @@ -268,6 +268,10 @@ export class Loading implements ComponentInterface, OverlayInterface { * This can be useful in a button handler for determining which button was * clicked to dismiss the loading. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise { diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index d32e092b19..a02552727e 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -662,6 +662,10 @@ export class Modal implements ComponentInterface, OverlayInterface { * * @param data Any data to emit in the dismiss events. * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise { diff --git a/core/src/components/picker/picker.tsx b/core/src/components/picker/picker.tsx index 4232288919..88e25e3efa 100644 --- a/core/src/components/picker/picker.tsx +++ b/core/src/components/picker/picker.tsx @@ -248,6 +248,10 @@ export class Picker implements ComponentInterface, OverlayInterface { * This can be useful in a button handler for determining which button was * clicked to dismiss the picker. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise { diff --git a/core/src/components/popover/popover.tsx b/core/src/components/popover/popover.tsx index 21dce20a5d..46f922b834 100644 --- a/core/src/components/popover/popover.tsx +++ b/core/src/components/popover/popover.tsx @@ -525,6 +525,10 @@ export class Popover implements ComponentInterface, PopoverInterface { * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'. * @param dismissParentPopover If `true`, dismissing this popover will also dismiss * a parent popover if this popover is nested. Defaults to `true`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string, dismissParentPopover = true): Promise { diff --git a/core/src/components/toast/toast.tsx b/core/src/components/toast/toast.tsx index fe960d3e32..a0938be7d6 100644 --- a/core/src/components/toast/toast.tsx +++ b/core/src/components/toast/toast.tsx @@ -401,6 +401,10 @@ export class Toast implements ComponentInterface, OverlayInterface { * This can be useful in a button handler for determining which button was * clicked to dismiss the toast. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. + * + * This is a no-op if the overlay has not been presented yet. If you want + * to remove an overlay from the DOM that was never presented, use the + * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method. */ @Method() async dismiss(data?: any, role?: string): Promise {