primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Carousel: Broken when running without React.StrictMode

Open MBR-0001 opened this issue 2 years ago • 3 comments

Describe the bug

Carousel component seems to be totally broken when React.StrictMode is turned off and circular/autoplayInterval option is used

Reproducer

https://codesandbox.io/s/magical-bartik-e1hwo1

The left/right buttons are not visible (due to imports I believe) but that doesn't affect the functionality

PrimeReact version

8.7.3

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Only tested in brave

Steps to reproduce the behavior

  1. Create a carousel like in the codesandbox sample and remove React.StrictMode from the app (or build for production)
  2. Observe the results - carousel is broken (happens when autoplayinterval and/or circular are used)

Expected behavior

Carousel should show items 1 2 and 3 but shows 4 5 6

MBR-0001 avatar Jan 26 '23 16:01 MBR-0001

It appears to be working for us with PrimeReact 9.3.0 . Could you update your PrimeReact version, please? If you are still unable to see icons with React.StrictMode please open one more ticket.

habubey avatar Apr 24 '23 11:04 habubey

The issue still exists, the issue is not related to icons but the content of the carousel after "scrolling" to the right...

With this information, do you still want me to open a new issue or should this one be reopened?

MBR-0001 avatar Apr 24 '23 12:04 MBR-0001

I also have this issue.

Removing the circular from the <Carousel /> fixed my problem, but I don't think that this is a viable solution, since the feature is very useful.

mdrodz avatar Jan 31 '24 19:01 mdrodz