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: Item disappear when there is only one item with autoplay and circular activated #6812

Closed
Allenille opened this issue Nov 19, 2024 · 3 comments · Fixed by #6902
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Allenille
Copy link

Describe the bug

Carousel: Item disappear when there is only one item with autoplay and circular activated

Reproducer

https://stackblitz.com/edit/evvfnc?file=src%2FApp.vue

PrimeVue version

4.2.2

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

To reproduce you can take the circular example from here : https://primevue.org/carousel/#circular
Open it in stackblitz and instead of having 9 elements in your list just remove the ither to have only one element to show.
Capture d’écran 2024-11-19 111356

Expected behavior

Element should appear and not disappear

@Allenille Allenille added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 19, 2024
@sivareddyuppathi
Copy link
Contributor

Hi @Allenille , if you pass :numVisible="1" if you have only one element it will work as expected. Let me know if it is not.

<Carousel :value="products" :numVisible="1" :numScroll="1" :responsiveOptions="responsiveOptions" circular :autoplayInterval="3000" >

@D4RKAR117
Copy link

D4RKAR117 commented Nov 19, 2024

Hey i also had the issue, and i narrowed the issue that is only present when the circular prop is true even without autoplay, temporal workaround is to simply put it false (or remove it)

also somehow if the content is visible outside (like a component with a fixed prop) of the carousel works just fine even with circular prop

@Allenille
Copy link
Author

Hi @sivareddyuppathi , still have the issue with :numVisible="1" : https://stackblitz.com/edit/evvfnc-vyqemd?file=src%2FApp.vue
As @D4RKAR117 mentioned if I remove the circular prop everything is working fine.
To resolve this I just deactivate circular props when there is less element than the number of element visible but I think that this problem should be handled by the caroussel itself no ?

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 25, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.2.5 milestone Dec 2, 2024
@github-project-automation github-project-automation bot moved this to Done in PrimeVue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants