Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel: Broken when running without React.StrictMode #3985

Open
MBR-0001 opened this issue Jan 26, 2023 · 3 comments
Open

Carousel: Broken when running without React.StrictMode #3985

MBR-0001 opened this issue Jan 26, 2023 · 3 comments
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@MBR-0001
Copy link

MBR-0001 commented Jan 26, 2023

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 MBR-0001 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 26, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 26, 2023
@habubey habubey self-assigned this Apr 24, 2023
@habubey
Copy link
Contributor

habubey commented Apr 24, 2023

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 habubey closed this as completed Apr 24, 2023
@MBR-0001
Copy link
Author

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?

@habubey habubey reopened this Apr 24, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 24, 2023
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 24, 2023
@melloware melloware assigned melloware and unassigned habubey and melloware Jul 1, 2023
@mdrodz
Copy link

mdrodz commented Jan 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

4 participants