From dce4edf962e19ed1be2e65fb91dad443acf23226 Mon Sep 17 00:00:00 2001 From: softhorizons Date: Wed, 12 Oct 2016 12:56:17 -0700 Subject: [PATCH] docs(popover): clarify the dismiss of a popover (#7795) Clarify that that unfortunately-named onDidDismiss() is not a callback, but rather *sets up* a callback. Also explain dismiss()'s argument and its relation to said callback. --- src/components/popover/popover.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/popover/popover.ts b/src/components/popover/popover.ts index 72d61b0193..88be1b8668 100644 --- a/src/components/popover/popover.ts +++ b/src/components/popover/popover.ts @@ -81,10 +81,11 @@ export class Popover extends ViewController { * To dismiss the popover after creation, call the `dismiss()` method on the * `Popover` instance. The popover can also be dismissed from within the popover's * view by calling the `dismiss()` method on the [ViewController](../../nav/ViewController). - * The `onDidDismiss` function can be called to perform an action after the popover - * is dismissed. The popover will dismiss when the backdrop is clicked, but this - * can be disabled by setting `enableBackdropDismiss` to `false` in the popover - * options. + * The `dismiss()` call accepts an optional parameter that will be passed to the callback described + * as follows. The `onDidDismiss()` function can be called to set up a callback action that will + * be performed after the popover is dismissed, receiving the parameter passed to `dismiss()`. + * The popover will dismiss when the backdrop is clicked by implicitly performing `dismiss(null)`, + * but this can be disabled by setting `enableBackdropDismiss` to `false` in the popover options. * * > Note that after the component is dismissed, it will not be usable anymore and * another one must be created. This can be avoided by wrapping the creation and