diff --git a/src/app/components/galleria/galleria.css b/src/app/components/galleria/galleria.css index 04b0ce1f8d0..07853d0b7cb 100755 --- a/src/app/components/galleria/galleria.css +++ b/src/app/components/galleria/galleria.css @@ -100,6 +100,7 @@ .p-galleria-thumbnail-items-container { overflow: hidden; + width: 100%; } .p-galleria-thumbnail-items { diff --git a/src/app/components/galleria/galleria.ts b/src/app/components/galleria/galleria.ts index 3f78f8f34d5..c7547cd2c3e 100755 --- a/src/app/components/galleria/galleria.ts +++ b/src/app/components/galleria/galleria.ts @@ -10,12 +10,12 @@ import { RippleModule } from 'primeng/ripple'; template: `
- +
- + `, changeDetection: ChangeDetectionStrategy.OnPush, @@ -145,6 +145,10 @@ export class Galleria implements OnChanges, OnDestroy { } } } + + if (simpleChanges.value && simpleChanges.value.currentValue?.length < this.numVisible) { + this.numVisible = simpleChanges.value.currentValue.length; + } } onMaskHide() { @@ -189,7 +193,7 @@ export class Galleria implements OnChanges, OnDestroy { (startSlideShow)="startSlideShow()" (stopSlideShow)="stopSlideShow()"> @@ -212,6 +216,8 @@ export class GalleriaContent { @Input() value: any[] = []; + @Input() numVisible: number; + @Output() maskHide: EventEmitter = new EventEmitter(); @Output() activeItemChange: EventEmitter = new EventEmitter();