Skip to content

Inifinite Scrolling not working with too small initial array #129

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions