primereact
primereact copied to clipboard
Carousel: Broken when running without React.StrictMode
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
- Create a carousel like in the codesandbox sample and remove React.StrictMode from the app (or build for production)
- 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
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.
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?
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.