Skip to content

Unable to manually trigger the check on lazyloaded elements #71

@ratibus

Description

@ratibus

Hello

Use case: I have a grid of lazyloaded images (hundreds of images) and on the top of the page some features to filter these images.

The issue is: when I use my filter features, some images under the fold are supposed to be loaded as some of above the fold images are excluded (=hidden). But there are not, I need to scroll or resize the screen for them to be loaded.

Indeed it seems that your in-viewport library "only" listens to scroll, resize and DOM mutation events. None of them are triggered in my case.
There seems to be no public method to call to force the debouncedCheck call (it would not be a problem for me to trigger the call manually in my own code, as my use case is quite specific).

Here are some screenshots to show the issue :

First display of the page:
lazyload_onload

Then we click on the button:
lazyload_show_even

I have to scroll down for the right images to appear:
lazyload_show_even_scrolled

I put this demo online : http://ratibus.net/vvo_lazyload/

Thanks in advance :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions