You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem to work when dynamically changing the image (in case of a caroussel for example).
I've checked your code and it seems you are not watching the src prop change. Your computed property has the src as dependency but nothing seems to reset the intersected data which make the next loading not work properly (I mean withou any lazy load or anything).
The text was updated successfully, but these errors were encountered:
Here's a fix, add a watcher and re-observe the disconnected observer
watch: {
src(newSrc, oldSrc) {
if ("IntersectionObserver" in window) {
this.intersected = false
this.observer.observe(this.$el)
}
}
},
One last problem is that there will be a momentary flicker back to the placeholder image. For my app, I need to keep the current image and just replace it with the new image (once loaded), so I will be adding a bit more code.
It doesn't seem to work when dynamically changing the image (in case of a caroussel for example).
I've checked your code and it seems you are not watching the src prop change. Your computed property has the src as dependency but nothing seems to reset the intersected data which make the next loading not work properly (I mean withou any lazy load or anything).
The text was updated successfully, but these errors were encountered: