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

IgniteUI / igniteui-webcomponents / 28851216392

07 Jul 2026 08:05AM UTC coverage: 98.329% (-0.006%) from 98.335%
28851216392

Pull #2222

github

web-flow
Merge e23869691 into fcab913eb
Pull Request #2222: feat: Added virtualization component

6063 of 6378 branches covered (95.06%)

Branch coverage included in aggregate %.

854 of 864 new or added lines in 6 files covered. (98.84%)

8 existing lines in 1 file now uncovered.

42835 of 43351 relevant lines covered (98.81%)

1556.78 hits per line

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

92.73
/src/components/virtualization/types.ts
1
/**
9✔
2
 * Context for the item template in the virtual scroll component.
9✔
3
 * Provides the item data, its index, and utility properties for template rendering.
9✔
4
 */
9✔
5
export class VirtualScrollItemContext<T> {
9✔
6
  /** The current item in the virtual scroll */
9✔
7
  public value: T;
9✔
8
  /** The index of the current item */
9✔
9
  public index: number;
9✔
10
  /** The total number of items */
9✔
11
  public count: number;
9✔
12

9✔
13
  constructor(value: T, index: number, count: number) {
9✔
14
    this.value = value;
1,606✔
15
    this.index = index;
1,606✔
16
    this.count = count;
1,606✔
17
  }
1,606✔
18

9✔
19
  /** Whether the current item is the first item */
9✔
20
  public get isFirst(): boolean {
9✔
NEW
21
    return this.index === 0;
×
NEW
22
  }
×
23

9✔
24
  /** Whether the current item is the last item */
9✔
25
  public get isLast(): boolean {
9✔
NEW
26
    return this.index === this.count - 1;
×
NEW
27
  }
×
28
}
9✔
29

9✔
30
/** Snapshot of the currently rendered virtual window */
9✔
31
export interface VirtualScrollState {
9✔
32
  /** The index of the first item currently rendered in the viewport. */
9✔
33
  startIndex: number;
9✔
34
  /** The index of the last item currently rendered in the viewport (inclusive). */
9✔
35
  endIndex: number;
9✔
36
  /** The size of the viewport in pixels. */
9✔
37
  viewportSize: number;
9✔
38
  /** The total size of the virtual scroll content in pixels. */
9✔
39
  totalSize: number;
9✔
40
}
9✔
41

9✔
42
/**
9✔
43
 * 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.
9✔
44
 * The consumer of the virtual scroll component can listen to this event and load more data as needed.
9✔
45
 */
9✔
46
export interface VirtualScrollDataRequest {
9✔
47
  /**
9✔
48
   * The first index that does not yet have data.
9✔
49
   * Append at least `(endIndex - startIndex + 1)` more items starting here.
9✔
50
   */
9✔
51
  startIndex: number;
9✔
52
  /** Number of items being requested. */
9✔
53
  count: number;
9✔
54
}
9✔
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