diff --git a/src/components/virtual-scroll/virtual-scroll.ts b/src/components/virtual-scroll/virtual-scroll.ts index dbadc82f41..46c70c7733 100644 --- a/src/components/virtual-scroll/virtual-scroll.ts +++ b/src/components/virtual-scroll/virtual-scroll.ts @@ -101,7 +101,6 @@ import { VirtualFooter, VirtualHeader, VirtualItem } from './virtual-item'; * slightly different heights between platforms, which is perfectly fine. * * - * * ### Images Within Virtual Scroll * * Ionic provides `` to manage HTTP requests and image rendering. @@ -135,6 +134,27 @@ import { VirtualFooter, VirtualHeader, VirtualItem } from './virtual-item'; * ``` * * + * ### Custom Components + * + * If a custom component is going to be used within Virtual Scroll, it's best + * to wrap it with a good old `
` to ensure the component is rendered + * correctly. Since each custom component's implementation and internals can be + * quite different, wrapping within a `
` is a safe way to make sure + * dimensions are measured correctly. + * + * ```html + * + * + *
+ * + * {% raw %} {{ item }}{% endraw %} + * + *
+ * + *
+ * ``` + * + * * ### Performance Tips * * - Use `` rather than `` so images are lazy loaded