Skip to content

Commit

Permalink
fix(react): load lazy images (if enabled) on children change
Browse files Browse the repository at this point in the history
fixes #4463
  • Loading branch information
nolimits4web committed Apr 26, 2021
1 parent 9a7f0fc commit ca0347b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/react/update-swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ function updateSwiper(swiper, slides, passedParams, changedParams) {
if (changedParams.includes('children') && virtual && currentParams.virtual.enabled) {
virtual.slides = slides;
virtual.update(true);
} else if (changedParams.includes('children') && swiper.lazy && swiper.params.lazy.enabled) {
swiper.lazy.load();
}

if (needThumbsInit) {
Expand Down

0 comments on commit ca0347b

Please sign in to comment.