• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 26023601418

18 May 2026 08:57AM UTC coverage: 4.854% (-85.3%) from 90.174%
26023601418

Pull #17281

github

web-flow
Merge e7ce7a18e into 5a85df190
Pull Request #17281: feat: Added virtual scroll component and sample implementation

400 of 17347 branches covered (2.31%)

Branch coverage included in aggregate %.

63 of 222 new or added lines in 4 files covered. (28.38%)

27932 existing lines in 341 files now uncovered.

2022 of 32547 relevant lines covered (6.21%)

0.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/projects/igniteui-angular/virtual-scroll/src/virtual-scroll/types.ts
1
/**
2
 * Context for the item template in the virtual scroll component.
3
 * Provides the item data, its index, and utility properties for template rendering.
4
 */
5
export class IgxVsItemContext<T> {
6
  constructor(
7
    /** The current item in the virtual scroll. */
NEW
8
    public $implicit: T,
×
9
    /** The index of the current item. */
NEW
10
    public index: number,
×
11
    /** The total number of items in the virtual scroll. */
NEW
12
    public count: number,
×
13
  ) {}
14

15
  /** Whether the current item is the first in the list. */
16
  public get first(): boolean {
NEW
17
    return this.index === 0;
×
18
  }
19

20
  /** Whether the current item is the last in the list. */
21
  public get last(): boolean {
NEW
22
    return this.index === this.count - 1;
×
23
  }
24

25
  /** Whether the current item is at an even index. */
26
  public get even(): boolean {
NEW
27
    return this.index % 2 === 0;
×
28
  }
29

30
  /** Whether the current item is at an odd index. */
31
  public get odd(): boolean {
NEW
32
    return !this.even;
×
33
  }
34
}
35

36
/**
37
 * Snapshot of the currently rendered virtual window.
38
 */
39
export interface VirtualScrollState {
40
  /** The index of the first item currently rendered in the viewport. */
41
  startIndex: number;
42
  /** The index of the last item currently rendered in the viewport (inclusive). */
43
  endIndex: number;
44
  /** The size of the viewport in pixels. */
45
  viewportSize: number;
46
  /** The total size of the virtual scroll content in pixels. */
47
  totalSize: number;
48
}
49

50
/**
51
 * Request for more data to be loaded in the virtual scroll, typically emitted when the user scrolls near the end of the currently loaded items.
52
 * The consumer of the virtual scroll component can listen to this event and load more data as needed.
53
 */
54
export interface VirtualScrollDataRequest {
55
  /**
56
   * The first index that does not yet have data.
57
   * Append at least `(endIndex - startIndex + 1)` more items starting here.
58
   */
59
  startIndex: number;
60
  /** Number of items being requested. */
61
  count: number;
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc