Skip to content

feat: createDataGrid composable#174

Draft
johnleider wants to merge 2 commits intomasterfrom
feat/create-data-grid
Draft

feat: createDataGrid composable#174
johnleider wants to merge 2 commits intomasterfrom
feat/create-data-grid

Conversation

@johnleider
Copy link
Copy Markdown
Member

Summary

  • Adds createDataGrid headless composable extending createDataTable with column layout, cell editing, row reordering, row spanning, nested headers, and adapter-based virtualization
  • Refactors createDataTable to support recursive column definitions via children (aligning with Vuetify's DataTableHeader shape)
  • Column sizing uses percentages (Splitter-compatible) with delta-based resizing

What's included

createDataTable refactor (prerequisite)

  • DataTableColumn.key relaxed from keyof T & string to string for group column support
  • New children property for recursive nesting
  • extractLeaves, computeDepth, resolveHeaders utilities in columns.ts
  • headers and leaves exposed on DataTableContext

createDataGrid composable

  • Column layout — percentage-based sizing, pinning (left/right/scrollable regions), delta-based resizing, reordering
  • Cell editing — edit/commit/cancel lifecycle, per-column validation, dirty tracking
  • Row ordering — ID-based order state with move/reset
  • Row spanning — computed span map with hidden cell tracking
  • Grid adapters — ClientGridAdapter, ServerGridAdapter, VirtualGridAdapter (row ordering inserted post-sort, pre-pagination)
  • Trinity patterncreateDataGridContext, createDataGridPlugin, useDataGrid

Test plan

  • 4320/4320 tests pass (128 new across 7 test files + zero regressions)
  • Typecheck clean
  • Lint clean
  • knip + sherif clean
  • Manual testing via dev playground (sort, search, edit, resize, pin)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 31, 2026

Open in StackBlitz

commit: 5fd3a60

@johnleider johnleider marked this pull request as draft March 31, 2026 14:23
claude added 2 commits April 12, 2026 01:02
Builds on createDataTable with column layout (sizing, pinning, resizing,
reordering), cell editing (commit/cancel + per-column validation),
ID-based row ordering, and a row spanning map. Inherits the full table
pipeline (filter/sort/paginate/select/expand/group) via spread.

Refactors createDataTable to support recursive column trees: relaxes
DataTableColumn.key from keyof T to string, adds children, and exposes
leaves + 2D headers via new extractLeaves/computeDepth/resolveHeaders
utilities.

Closes #174
…available

deriveFirstDayOfWeek only checked Intl.Locale.getWeekInfo(), which is
absent on the older ICU shipped with current LTS Node. The v0 date
adapter already handles both forms; mirror that fallback in the helper so
locale-driven first-day derivation works in CI.
@johnleider johnleider force-pushed the feat/create-data-grid branch from 08d1b2b to 5fd3a60 Compare April 12, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants