Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest version with embroider doesn't add elements as you scroll #395

Open
BryanCrotaz opened this issue Nov 10, 2022 · 2 comments
Open

Comments

@BryanCrotaz
Copy link
Contributor

BryanCrotaz commented Nov 10, 2022

items is a static array of complex objects generated asynchronously
Not loading vertical-collection until the objects are ready
It shows the first two (or more if buffer size arg is used) but never shows the rest. I'd expect them to appear as the user scrolls down. The closing occluded content has the correct initial height but the opening content always has a height of 0 and the closing content height doesn't change

<div style="height: 100vh;">
  {{#let (await this.pages) as |pages|}}
    {{#if pages}}
      <VerticalCollection 
        @items={{pages}}
        @estimateHeight="868" 
        @key="_pageIndex"
        as | page |>
        <div page={{page._pageIndex}} {{render-pdf-page page}} />
      </VerticalCollection>
    {{/if}}
  {{/let}}
</div>
@BryanCrotaz
Copy link
Contributor Author

Turns out you need to add overflow:auto on the outer container. It would be nice if the docs mentioned this sort of thing if it's compulsory.

@runspired
Copy link
Contributor

It's designed to work with whatever CSS you bring, but that does have constraints (if you want div vs body scrolling that needs to be setup, and the layout can't have errors meaning the browser needs to be able to correctly ascertain the positioning and height, which lots of folks don't realize they write broken css but lots of layouts are broken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants