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 page prop not detecting changes to prop value. #1464

Closed
hollymiller525 opened this issue Jul 20, 2020 · 0 comments
Closed

Carousel page prop not detecting changes to prop value. #1464

hollymiller525 opened this issue Jul 20, 2020 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@hollymiller525
Copy link

hollymiller525 commented Jul 20, 2020

I'm submitting a ... (check one with "x")

[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)

https://codesandbox.io/s/jovial-bhabha-t9n4k

Current behavior
Currently the carousel page prop is not updating properly when the page prop data changes. It seems to be that the totalShiftedItems state is not being tracked, and therefore unable to scroll to active page.

Expected behavior
That's the page prop can support changes made to the prop value which would allow the carousel to detect which page should be the active slide, and scroll to the specified page.

Minimal reproduction of the problem with instructions

  1. Provide state to the page prop.
  2. Update the state to the page prop.
  3. Will see the issue as the updated state is not being tracked and no re-rendering.

React version:
16.13.0
PrimeReact version:
4.2.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

@mertsincan mertsincan self-assigned this Sep 19, 2020
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Sep 19, 2020
@mertsincan mertsincan added this to the 5.0.0.Final milestone Sep 19, 2020
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

2 participants