Topic: MDBLazyLoading without having to move
max rioux 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
malte premium answered 1 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- 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
max rioux 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 1 year ago
I managed to locate the problem, we added it to our TODO list.
max rioux priority commented 1 year ago
Glad to read that !
max rioux priority commented 1 year ago
How far is it on your TODO list? :)
Grzegorz Bujański staff commented 1 year 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