[ACS-9978] DynamicChipListComponent not rendered as expected (#11132)

This commit is contained in:
dominikiwanekhyland
2025-08-21 13:48:14 +02:00
committed by GitHub
parent ac7e21d699
commit 2e20c3da45

View File

@@ -179,7 +179,9 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni
chips.reduce((width, val, index) => {
width += val._elementRef.nativeElement.getBoundingClientRect().width + chipMargin;
const availableSpace =
(index === chips.length - 1 && width <= containerWidth) ? containerWidth : containerWidth - viewMoreBtnWidth;
(index === chips.length - 1 && width <= containerWidth) || this.paginationData
? containerWidth
: containerWidth - viewMoreBtnWidth;
if (availableSpace >= width - chipMargin) {
chipsToDisplay = (this.paginationData ? chipsToDisplay : index) + 1;
lastIndex++;