Skip to content

Implementation of Feature #167; loading more items in carousel mode#168

Open
fknives wants to merge 1 commit intoalangrainger:mainfrom
fknives:feature/preload-in-carousel
Open

Implementation of Feature #167; loading more items in carousel mode#168
fknives wants to merge 1 commit intoalangrainger:mainfrom
fknives:feature/preload-in-carousel

Conversation

@fknives
Copy link

@fknives fknives commented Jan 7, 2026

As described in the feature request #167 , the infinite scrolling works great to load the elements on scroll, but the same is not done in carousel mode. This PR intends to do that.

The idea is to listen to lightGallery slide events, specifically to the lgAfterSlide which is fired immediately after each slide transition.
And if we are reaching the current index or elements call the same loadMoreItems function as the scroll listener does.

As a result when getting close to the final elements, more elements are loaded in

@fknives
Copy link
Author

fknives commented Jan 9, 2026

This could also be related what is described in #126

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

Successfully merging this pull request may close these issues.

1 participant