You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`ArrowLeft`| When used in a child popover, closes the popover and returns focus to the parent popover. |
225
225
|`Space`, `Enter`, and `ArrowRight`| When focusing a trigger element, opens the associated popover. |
226
226
227
+
## Performance
228
+
229
+
### Mounting Inner Contents
230
+
231
+
The content of an inline `ion-popover` is unmounted when closed. If this content is expensive to render, developers can use the `keepContentsMounted` property to mount the content as soon as the popover is mounted. This can help optimize the responsiveness of your application as the inner contents will have already been mounted when the popover opens.
232
+
233
+
import Mount from '@site/static/usage/popover/performance/mount/index.md';
234
+
235
+
<Mount />
236
+
237
+
Developers should keep the following in mind when using `keepContentsMounted`:
238
+
239
+
- This feature should be used as a last resort in order to deal with existing performance problems. Try to identify and resolve performance bottlenecks before using this feature. Additionally, do not use this to anticipate performance problems.
240
+
241
+
- This feature is only needed when using a JavaScript Framework. Developers not using a framework can pass the contents to be rendered into the popover, and the contents will be rendered automatically.
242
+
243
+
- This feature only works with inline popovers. Popovers created with the `popoverController` are not created ahead of time, so the inner contents are not created either.
244
+
245
+
- Any JavaScript Framework lifecycle hooks on the inner component will run as soon as the popover is mounted, not when the popover is presented.
0 commit comments