Frontend & UISûr100100/100
With Tanstack Virtual (TanStack) — Angular Table
Virtualize Angular Table final row or column models inside the correct injection and reactive lifecycle with signal counts, scroll elements, keys, measurement, transforms, sticky regions, grid/flex sizing, and infinite data.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs with-tanstack-virtual__tanstack-table__packages-angular-table-skills-917170a5a689TanStack
TanStack/table
Contenu à copier
---
name: with-tanstack-virtual
description: >
Virtualize Angular Table final row or column models inside the correct injection and reactive lifecycle with signal counts, scroll elements, keys, measurement, transforms, sticky regions, grid/flex sizing, and infinite data.
metadata:
origin: TanStack
type: composition
library: '@tanstack/angular-table'
framework: angular
library_version: '9.2.4'
requires:
- '@tanstack/table-core#core'
- getting-started
- table-state
sources:
- 'TanStack/table:docs/framework/angular/guide/virtualization.md'
- 'TanStack/table:examples/angular/virtualized-rows'
- 'TanStack/table:examples/angular/virtualized-columns'
- 'TanStack/table:examples/angular/virtualized-infinite-scrolling'
---
This skill builds on `@tanstack/table-core#core`, `getting-started`, and `table-state`. Virtual is a rendering concern over final Table models, not a feature plugin.
## Setup
```ts
import { computed, viewChild } from '@angular/core'
import { injectVirtualizer } from '@tanstack/angular-virtual'
import type { ElementRef } from '@angular/core'
export class VirtualTable {
readonly scrollElement =
viewChild<ElementRef<HTMLDivElement>>('scrollElement')
readonly rows = computed(() => this.table.getRowModel().rows)
readonly rowVirtualizer = injectVirtualizer(() => ({
count: this.rows().length,
scrollElement: this.scrollElement()?.nativeElement,
estimateSize: () => 34,
getItemKey: (index) => this.rows()[index]!.id,
overscan: 5,
}))
readonly virtualRows = computed(() => this.rowVirtualizer.getVirtualItems())
readonly totalSize = computed(() => this.rowVirtualizer.getTotalSize())
}
```
## Core Patterns
### Derive reactive models
Use `computed(() => table.getRowModel().rows)` and `computed(() => table.getVisibleLeafColumns())`. `injectVirtualizer` tracks signal reads in its initializer and requires injection context.
### Own the layout contract
Give the scroll element bounded overflow, create a total-size spacer, and translate or measure each virtual item. Use grid/flex widths for dynamic rows/columns and keep sticky headers inside the correct scroll geometry.
### Gate infinite fetches
When the last virtual item approaches fetched length, fetch only if more server rows exist and a request is not active. Manual sorting requires server-sorted pages and a reset/refetch policy.
## Common Mistakes
### CRITICAL Constructing outside injection context
Wrong:
```ts
export function virtualize(options) {
return injectVirtualizer(() => options)
}
```
Correct:
```ts
export class VirtualTable {
readonly virtualizer = injectVirtualizer(() => options())
}
```
The Angular virtualizer follows DI lifecycle rules just like `injectTable`.
Source: `examples/angular/virtualized-rows/src/app/app.ts`
### HIGH Virtualizing raw data
Wrong:
```ts
readonly rows = computed(() => this.data())
```
Correct:
```ts
readonly rows = computed(() => this.table.getRowModel().rows)
```
Raw data bypasses Table filtering, sorting, expansion, grouping, and pagination.
Source: `docs/framework/angular/guide/virtualization.md`
### HIGH Forgetting spacer and transforms
Wrong:
```html
@for (item of virtualRows(); track item.key) {
<div>{{ rows()[item.index].id }}</div>
}
```
Correct:
```html
<div [style.height.px]="totalSize()" style="position:relative">
<div style="position:absolute"></div>
</div>
```
Virtual computes ranges and sizes but does not apply DOM geometry, sticky CSS, or column widths.
Source: `examples/angular/virtualized-columns/src/app/app.ts`
## API Discovery
Inspect installed `@tanstack/angular-table/dist/types/`, installed `@tanstack/angular-virtual/dist/`, and the maintained Angular examples for current row, column, measurement, and infinite patterns.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait With Tanstack Virtual (TanStack) — Angular Table
Applique les pratiques du skill with-tanstack-virtual__tanstack-table__packages-angular-table-skills-917170a5a689.
Comment utiliser With Tanstack Virtual (TanStack) — Angular Table
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour With Tanstack Virtual (TanStack) — Angular Table
Dis simplement à ton agent quelque chose comme :
Applique le skill with-tanstack-virtual__tanstack-table__packages-angular-table-skills-917170a5a689 à cette tâche
Utilise with-tanstack-virtual__tanstack-table__packages-angular-table-skills-917170a5a689 pour améliorer cette implémentation
Passe en revue ce sujet avec with-tanstack-virtual__tanstack-table__packages-angular-table-skills-917170a5a689
Skills liés à With Tanstack Virtual (TanStack) — Angular Table
accessibility
Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard navigation, or screen-reader support.Accessibility Pass (Microsoft)
Use this skill whenever the user asks to check, review, or fix the accessibility of a PowerPoint deck, Word document, HTML page, or Markdown file, and before handing over any deck or document this agent just generated, so it does not ship with missing alt text, untitled slides, or unreadable colour contrast.Add Connector (Microsoft)
Use when adding a Power Platform connector to an Expo/React Native Power Apps mobile app and no dedicated mobile connector skill exists.