Skip to content

Issue with PrimeVue Carousel in Web component #8196

@ar3a51

Description

@ar3a51

Describe the bug

Hi,

I'm currently implementing Primevue carousel in a custom element. I got an issue, when the custom elements are stack together, It seems the config got overwriten by the last one. I have attached on how to reproduce the problem in stackblitz.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/vitejs-vite-oyqi3qx8

Environment

Operating system: Windows 11 64bit

Vue version

3.5.22

PrimeVue version

4.4.1

Node version

22.x.x

Browser(s)

Chrome Version 140

Steps to reproduce the behavior

See the stackblitz link.

  1. In carousel1, put numVisible to 1.
  2. In carousel2, put numVisible to 2.
  3. Reload the page.

Notice the behaviour of carousel1. Both slides are displayed in carousel1 with next button active. When the next button is clicked, it will slide to an empty page. Whereas in carousel2, it behaves correctly.

Expected behavior

Configuration should be able to be set independently as the carousels sit in 2 different components separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions