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

Inifinite Scrolling not working with too small initial array #129

Closed
paranoidandroid522 opened this Issue Feb 16, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@paranoidandroid522
Copy link

paranoidandroid522 commented Feb 16, 2018

I'm submitting a bug report

  • Library Version:
    1.0.0-beta.3.2.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    7.8.0

  • NPM Version:
    4.2.0
  • JSPM OR Webpack AND Version
    JSPM 0.16.53
  • Browser:
    all

  • Language:
    TypeScript 2.2.1

Current behavior:

When I use infinite-scroll-next="getMore" with a very small initial array (e.g. just one item) so that the initial content fits into the visible view port, my getMore function never gets called (presumably since the browser won't trigger scroll events in that case).

Note:

I tried really hard to create a gist the template linked here, but I'm unable to figure out how to add external NPM dependencies (i.e. aurelia-ui-virtualization) to the template :-(. If someone could help me out here, I would be happy to create a gist.

Expected/desired behavior:

  • What is the expected behavior?

The containing element should be filled up with the function bound to infinite-scroll-next until it overflows or there are no new items added.

  • What is the motivation / use case for changing the behavior?

General robustness of this plugin. Right now, I have to initialize the initial array with "just enough" items so that the container overflows and scrolling events get triggered. This feels a little too much like guesswork for my tastes - I'm afraid that this behavior might lead to nasty bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment