MDBLazyLoading without having to move


Topic: MDBLazyLoading without having to move

max rioux pro premium priority asked 2 years ago

Expected behavior : MDBLazyLoading should load picture as soon as they are on screen without having to scroll


Actual behavior : I need to scroll for the images in the initial view to appears, this is particulary a problem when I have not enough images for the scrollbar to appear because they are stuck in loading


max rioux pro premium priority commented 2 years ago

I tried to set lazyDelay={0}, lazyOffset={0} and even lazyOffset={-100}but it doesn't work


Jacek Roszak pro commented 2 years ago

I managed to locate the problem, we added it to our TODO list.


max rioux pro premium priority commented 2 years ago

Glad to read that !


max rioux pro premium priority commented 2 years ago

How far is it on your TODO list? :)


Grzegorz Bujański staff commented 2 years ago

Currently we are focusing mainly on bug fixes. This bug is on the list of things to fix and we will try to fix it as soon as possible


malte pro premium answered a year ago

As a workarround (its dirty I know) I used:

window.scrollTo(window.scrollX, window.scrollY - 1);
window.scrollTo(window.scrollX, window.scrollY + 1);

Call it with a 1ms delay after your data is loaded.

Source: https://stackoverflow.com/questions/35879452/how-to-trigger-an-on-scroll-event-without-scrolling


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 5.1.0
  • Device: Computer
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No