Skip to content

Force initial loading when not at distance #36

@JeanLucEsser

Description

@JeanLucEsser

I have a page such as the distance from the bottom is too high by default to trigger the infinite scrolling. Is there a way to force initial loading of elements independent from the distance?

Imagine the following layout where column 2 can be very tall and column 1 has the scrolling list:

*****************************************************
*                column 1                * column 2 *
*****************************************************
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*                                        *    xxx   *
*****************************************************

The only way I see to load the list is to go to the bottom of the page (the scroll parent). It will then fill the page if it is very tall, no problem. The issue is the first (initial) loading.

The solution would be the option to fill the page on load without relying on the distance parameter. Something akin to "Always fill the page on load, whatever the distance".

Another (better?) solution would be to rely on the viewport. If the viewport is empty, fill it. Not sure this is possible though.

Am I missing something obvious here to trigger onInfinite() on page load? Firing onInfinite() on Vue instantiation mounted event won't work well as the spinner won't show and in some cases (short page) onInfinite() will be called twice.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions