scandipwa / scandipwa

Next-generation front-end for Magento 2

Home Page:https://scandipwa.com/?utm_source=github&utm_medium=readme&utm_campaign=general

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Product image is not changed when clicking on thumbnails when zooming in desktop mode.

johanroberthson opened this issue · comments

Steps to reproduce:

  1. Go to a product with more than one image.
  2. Click on the image to zoom/make it bigger.
  3. Click on other images in the thumbnail gallery.

Actual result
Nothing happends. It work if you swipe with mouse.

Expected result
Image should switch.

Versions

  • ScandiPWA: 6.2.3
  • Any other composer module, you thing could be related
  • Browser version if relevant to the context
  • OS version if relevant to the context

Additional context
The error is in CarouselScroll.component.tsx i function componentDidUpdate
if (activeItemId !== null && activeItemId !== prevActiveItemId) {
this.handleChange(activeItemId);
}
When sliding it work but its not working for clicking the thumbnails.

Change to:
if (activeItemId !== null && activeItemId !== prevActiveItemId) {
this.handleChange(prevActiveItemId);
}
Then the buttons work but not sliding.