Carousel wrong pagination if numScroll is set to 1 and data is loaded dynamically #12043
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
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
The text was updated successfully, but these errors were encountered: