}
@Component({
- selector: 'list-overflow',
+ selector: 'my-list-overflow',
templateUrl: './list-overflow.component.html',
styleUrls: [ './list-overflow.component.scss' ],
changeDetection: ChangeDetectionStrategy.OnPush
let showItemsUntilIndexExcluded: number
let accWidth = 0
- for (const [index, el] of this.itemsRendered.toArray().entries()) {
+ for (const [ index, el ] of this.itemsRendered.toArray().entries()) {
accWidth += el.nativeElement.getBoundingClientRect().width
if (showItemsUntilIndexExcluded === undefined) {
showItemsUntilIndexExcluded = (parentWidth < accWidth) ? index : undefined