There’s a warning in the docs about keeping dimensions fixed. I understand that you can’t have them all be the same height, but can you at least guarantee that a given jobCardVirtualScrollItem doesn’t ever change size?
Well, if you weren’t sure about that (such as if something is coming in from a future and isn’t necessarily ready when the component is instantiated), then I thought that might be related to your layout problems, as maybe the virtual scroll thinks that the cards are smaller than they end up being.
Right ok. If only there was some way to call the resize() method manually in the virtual scroll component class. I don’t think there’s any way to do it.
@Thavarajan Ok… so any indication of how to fix it along with that assertion? I don’t see anything different in your plunkr, the result is the same as mine.
Note: My example has the card wrapped in a div because in the real project, the card is in a separate component.
Ionic 2 docs specify to wrap custom components in a div in virtual scroll:
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
Thanks, but that’s just not correct. I have made a new plunkr, with larger cards, inline as you stated and they still overlap. This is clearly a framework issue and nothing to do with my markup, see below: