BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/niko-table/data-table-virtualized

DataTable Virtualized Structure

niko-table/data-table-virtualized
FreeComponent

Virtualized table structure for rendering large datasets efficiently using TanStack Virtual.

Install it

npx shadcn@latest add https://niko-table.com/r/data-table-virtualized.json

Source

src/components/niko-table/core/data-table-virtualized-structure.tsxniko-table.com/r/data-table-virtualized.json · first 6 KB
1"use client"
2
3/**
4 * niko-table — created by Semir N. (Semkoo, https://github.com/Semkoo) with AI assistance.
5 *
6 * Before reporting anything: please check the changelog first.
7 * - In-repo: ./CHANGELOG.md
8 * - Docs site: https://niko-table.com/changelog
9 *
10 * Found a bug or have a fix? Open an issue or PR on GitHub so other
11 * users (and future LLMs reading this code) benefit:
12 * https://github.com/Semkoo/niko-table-registry
13 */
14import { flexRender, type Row } from "@tanstack/react-table"
15import { useVirtualizer } from "@tanstack/react-virtual"
16import { Skeleton } from "@/components/ui/skeleton"
17import {
18 TableBody,
19 TableCell,
20 TableHead,
21 TableHeader,
22 TableRow,
23} from "@/components/ui/table"
24import { cn } from "@/lib/utils"
25import { Loader2 } from "lucide-react"
26import React from "react"
27import { DataTableColumnHeaderRoot } from "../components/data-table-column-header"
28import { DataTableEmptyState } from "../components/data-table-empty-state"
29import { DataTableRowContextMenu } from "../components/data-table-row-context-menu"
30import { useResolvedRowContextMenuRenderer } from "../components/data-table-row-context-menu-slot"
31import { DataTableColumnResizeHandle } from "../lib/column-resize-handle"
32import { createScrollHandler } from "../lib/create-scroll-handler"
33import { resolveColumnWidth, resolveFlexColumnIds } from "../lib/flex-columns"
34import { isInteractiveClickTarget } from "../lib/row-click"
35import { getCommonPinningStyles } from "../lib/styles"
36import {
37 flashCellKey,
38 useDataTable,
39 useDataTableActiveCell,
40} from "./data-table-context"
41
42// ============================================================================
43// Row measurement helper
44// ============================================================================
45
46// Sums base + expanded sibling height (ResizeObserver only sees the base row).
47// Disabled in Firefox where stale `getBoundingClientRect` causes measure loops.
48//
49// Prefers `ResizeObserverEntry.borderBoxSize` for the base row when TanStack
50// Virtual passes the entry through — that height is computed off the same
51// observation that fired the callback, so we skip a forced layout read.
52// Falls back to `getBoundingClientRect` for the initial measure (no entry)
53// and for the expanded sibling (not observed by the virtualizer).
54const measureRowWithExpansion:
55 | ((element: Element, entry?: ResizeObserverEntry | undefined) => number)
56 | undefined =
57// … truncated

What it pulls in

npm packages

  • @tanstack/react-virtual

Other registry items

  • https://niko-table.com/r/data-table.json

Files it writes

  • src/components/niko-table/core/data-table-virtualized-structure.tsx

Facts

Registry
niko-table
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

niko-table.com Semkoo/niko-table-registry on GitHub Raw registry item This item as JSON

More from niko-table

All 31 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
DataTable Asidedata-table-asideniko-tableComponentsFree1 dep
DataTable Clear Filterdata-table-clear-filterniko-tableComponentsFree1 dep · 2 files
DataTable Column Auto-fitdata-table-column-auto-fitniko-tableComponentsFreeno deps · 2 files
DataTable Column Date Filterdata-table-column-date-filterniko-tableComponentsFree2 deps · 2 files
DataTable Column DnDdata-table-column-dndniko-tableComponentsFree4 deps · 3 files
DataTable Column Faceted Filterdata-table-column-faceted-filterniko-tableComponentsFree1 dep · 3 files
DataTable Column Hidedata-table-column-hideniko-tableComponentsFree1 dep · 2 files
DataTable Column Pindata-table-column-pinniko-tableComponentsFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex