mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
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.
This commit is contained in:

committed by
Brandy Carney

parent
ca3b9455d1
commit
dce4edf962
@ -81,10 +81,11 @@ export class Popover extends ViewController {
|
|||||||
* To dismiss the popover after creation, call the `dismiss()` method on the
|
* 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
|
* `Popover` instance. The popover can also be dismissed from within the popover's
|
||||||
* view by calling the `dismiss()` method on the [ViewController](../../nav/ViewController).
|
* view by calling the `dismiss()` method on the [ViewController](../../nav/ViewController).
|
||||||
* The `onDidDismiss` function can be called to perform an action after the popover
|
* The `dismiss()` call accepts an optional parameter that will be passed to the callback described
|
||||||
* is dismissed. The popover will dismiss when the backdrop is clicked, but this
|
* as follows. The `onDidDismiss(<func>)` function can be called to set up a callback action that will
|
||||||
* can be disabled by setting `enableBackdropDismiss` to `false` in the popover
|
* be performed after the popover is dismissed, receiving the parameter passed to `dismiss()`.
|
||||||
* options.
|
* 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
|
* > 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
|
* another one must be created. This can be avoided by wrapping the creation and
|
||||||
|
Reference in New Issue
Block a user