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 wrong pagination if numScroll is set to 1 and data is loaded dynamically #12043

Closed
Xriuk opened this issue Oct 13, 2022 · 0 comments · Fixed by #12049
Closed

Carousel wrong pagination if numScroll is set to 1 and data is loaded dynamically #12043

Xriuk opened this issue Oct 13, 2022 · 0 comments · Fixed by #12049
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Xriuk
Copy link

Xriuk commented Oct 13, 2022

Describe the bug

I have 12 items and [numVisible]="3" [numScroll]="1" this causes to display the last page (if [circular]="true") or 3 empty elements (if [circular]="false") and the indicator is missing.
As soon as you scroll past the last wrong element it displays the first element of the first page correctly and the indicator starts working again.
If I set [numScroll] to other numbers than 1, like 2, 3 it works normally.
This happens only if data is loaded later with an Observable or similar.

Environment

"primeflex": "^3.2.1"
"primeicons": "^5.0.0"
"primeng": "^13.2.1"

Reproducer

https://stackblitz.com/edit/github-juphdi?file=package.json

Angular version

13.2.0

PrimeNG version

13.4.1

Build / Runtime

Angular CLI App

Language

ES6

Node version (for AoT issues node --version)

16.14.0

Browser(s)

No response

Steps to reproduce the behavior

See stackblitz above

Expected behavior

The carousel should load the first page correctly

@Xriuk Xriuk added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 13, 2022
volvachev added a commit to volvachev/primeng that referenced this issue Oct 16, 2022
volvachev added a commit to volvachev/primeng that referenced this issue Nov 15, 2022
@cetincakiroglu cetincakiroglu added this to the 14.2.3 milestone Nov 16, 2022
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants