import { Component, TemplateRef, ViewChild } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ScrollContainerComponent, ScrollVirtualConfig } from '../../../../../ui-essentials/src/lib/components/layout/scroll-container/scroll-container.component'; @Component({ selector: 'ui-scroll-container-demo', standalone: true, imports: [CommonModule, ScrollContainerComponent], template: `
{{ i + 1 }}. {{ item }}
}Scroll events: Top reached {{ topCount }} times, Bottom reached {{ bottomCount }} times
{{ i + 1 }}. {{ item }}
}| {{ row.id }} | {{ row.name }} | {{ row.description }} | {{ row.value }} | {{ row.status }} |
{{ i + 1 }}. {{ item }}
}Virtual scrolling with {{ largeDataset.length }} items (only visible items are rendered)
{{ i + 1 }}. {{ item }}
}Scroll position is saved and restored automatically (uses sessionStorage)
{{ i + 1 }}. {{ item }}
}Current scroll position: {{ currentScrollPosition.top }}px (top), {{ currentScrollPosition.left }}px (left)
Is scrolling: {{ isScrolling ? 'Yes' : 'No' }}
{{ item.content }}