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

"Connected" lazyload loads simultaneously #173

Open
eneadriancatalin opened this issue Jul 26, 2024 · 1 comment
Open

"Connected" lazyload loads simultaneously #173

eneadriancatalin opened this issue Jul 26, 2024 · 1 comment

Comments

@eneadriancatalin
Copy link

eneadriancatalin commented Jul 26, 2024

If you have 2 lazyload each one next to the other, when the first one is in viewpost, the second one is loaded automatically.
Example:

<div>
<LazyLoad ..>
    <Component1 />
  </LazyLoad>
</div>
<div>
  <LazyLoad ..>
    <Component2 />
  </LazyLoad>
</div>

Even if I have the inside a div, when the Component1 is in the viewport, the Component2 is loaded too

Workaround:
If you have some content between each then it loads when it is the viewport

<LazyLoad ..>
  <Component1 />
</LazyLoad>
<div>Filler content</div>
<LazyLoad ..>
  <Component2 />
</LazyLoad>
<div>Some more spacer content</div>

Now Conmponent1 is loaded when it's in the viewport, and Component2 is loaded when it's in the viewport

@loktar00
Copy link
Owner

Not sure I understand, looks like your code wasn't fully added to the issue.

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