Skip to content

Commit

Permalink
fix(virtual): fix Virtual slides in React, Vue & Angular
Browse files Browse the repository at this point in the history
fixes #4899
  • Loading branch information
nolimits4web committed Sep 7, 2021
1 parent 164e91c commit e80925e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/angular/src/swiper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ export class SwiperComponent implements OnInit {
swiperRef.virtual.slides = this.slides;
const extendWith = {
cache: false,
slides: this.slides,
renderExternal: this.updateVirtualSlides,
renderExternalUpdate: false,
};
Expand Down
1 change: 1 addition & 0 deletions src/react/swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const Swiper = forwardRef(
swiperRef.current.virtual.slides = slides;
const extendWith = {
cache: false,
slides,
renderExternal: setVirtualData,
renderExternalUpdate: false,
};
Expand Down
1 change: 1 addition & 0 deletions src/vue/swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ const Swiper = {
swiperRef.value.virtual.slides = slidesRef.value;
const extendWith = {
cache: false,
slides: slidesRef.value,
renderExternal: (data) => {
virtualData.value = data;
},
Expand Down

0 comments on commit e80925e

Please sign in to comment.