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-row-dnd

DataTable Virtualized Row DnD

niko-table/data-table-virtualized-row-dnd
FreeComponent

Virtualized row drag-and-drop body (`DataTableVirtualizedDndBody`). Requires data-table-virtualized + data-table-row-dnd. Does not ship column DnD.

Install it

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

Source

src/components/niko-table/core/data-table-virtualized-row-dnd-structure.tsxniko-table.com/r/data-table-virtualized-row-dnd.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 */
14/**
15 * @internal Deep-import only.
16 * Intentionally not re-exported from the package barrel — the DnD
17 * virtualized variants are an opt-in advanced surface; the deep
18 * path keeps consumers explicit about pulling them in and avoids
19 * bloating the barrel for the common (non-DnD) case.
20 */
21
22import React from "react"
23import { useVirtualizer } from "@tanstack/react-virtual"
24import { flexRender, type Row } from "@tanstack/react-table"
25import { cn } from "@/lib/utils"
26import { useDataTable } from "./data-table-context"
27import { TableRow, TableBody, TableCell } from "@/components/ui/table"
28import { DataTableRowContextMenu } from "../components/data-table-row-context-menu"
29import { useResolvedRowContextMenuRenderer } from "../components/data-table-row-context-menu-slot"
30import { createScrollHandler } from "../lib/create-scroll-handler"
31import { resolveRowFromClick } from "../lib/row-click"
32import { getCommonPinningStyles } from "../lib/styles"
33import {
34 SortableContext,
35 verticalListSortingStrategy,
36 type UniqueIdentifier,
37} from "../filters/table-row-dnd"
38import { useSortable } from "@dnd-kit/sortable"
39import { CSS } from "@dnd-kit/utilities"
40import type { ScrollEvent } from "./data-table-virtualized-structure"
41
42// ============================================================================
43// Stable measureElement — computed once at module level
44// ============================================================================
45
46// See `data-table-virtualized-structure.tsx` for full rationale: sums base +
47// adjacent expanded-row height since ResizeObserver only attaches to the base.
48// Prefers `ResizeObserverEntry.borderBoxSize` over `getBoundingClientRect`
49// when TanStack Virtual passes the entry — skips a forced layout read on
50// the hot path. Disabled in Firefox (stale getBoundingClientRect during
51// scroll). Module-scoped for stable reference identity.
52const measureElement:
53 | ((element: Element, entry?: ResizeObserverEntry | undefined) => number)
54 | undefined =
55// … truncated

What it pulls in

npm packages

  • @tanstack/react-virtual
  • @dnd-kit/sortable
  • @dnd-kit/utilities

Other registry items

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

Files it writes

  • src/components/niko-table/core/data-table-virtualized-row-dnd-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
today

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