Galleria: thumbnail items doesn't work properly when responsive options are set #9744
Labels
LTS-FIXED-9.2.5
Fixed in PrimeNG LTS 9.2.5
LTS-FIXED-10.1.0
Fixed in PrimeNG LTS 10.1.0
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://www.primefaces.org/primeng/showcase/#/galleria
Current behavior
If you have responsive options, the thumbnail panel doesn't show the selected image when navigating, hides thumbnails and you are not able to navigate to all images.
Expected behavior
Thumbnail navigation should show the selected image and be able to navigate to all images.
Minimal reproduction of the problem with instructions
When you have responsive options, it takes global numVisible and not responsiveOptions numVisible because of calculatePosition() doesn't have set itemsContainer at first.
primeng/src/app/components/galleria/galleria.ts
Lines 671 to 673 in e451618
If you resize window, it works as expected because it runs calculatePosition function.
One ugly workaround should be fire manually resize event after component is rendered:
It forces to go to calculatePosition() and set the correct d_numVisible variable according with responsiveOptions.
Angular version: 5.X
9.0 but is failing in all versions (the code is the same)
PrimeNG version: 5.X
9.0 but is failing in all versions (the code is the same)
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 ]
Tested in Firefox 84.0.2 and chrome 87.0.4280.66, but I think that affect all browsers
The text was updated successfully, but these errors were encountered: