Skip to content

GhostDataGrid reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

Editable APG data grid over consumer-owned rows: a native table with role="grid", one Tab stop, two-dimensional arrow, Home/End, Ctrl+Home/End, and Page Up/Down focus movement, and a labeled single-line text editor per editable cell. Proposes changed drafts through editRequest and never writes data; the app accepts by updating data or rejects through cellErrors.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
cellErrorsreadonly DataGridCellError[]"[]"NoApp-controlled messages shown on cells; the grid never adds or clears entries.
columnsreadonly DataGridColumnDef<TData>[]—YesColumn definitions in reading order. Column IDs must be unique.
datareadonly TData[]—YesConsumer-owned rows in display order. Never sorted, cloned, or mutated.
getRowIdDataTableGetRowId<TData>—YesStable row ID, as in DataTable. Focus and open drafts follow it across reorders. Row IDs must be unique.

Emits ​

NamePayloadDescription
editRequestDataGridEditRequestProposes a changed draft once, after Enter (the editor has closed and focus is back on the cell) or during Tab/Shift+Tab. Not emitted for unchanged drafts, Escape, focus loss, removal, or invalidation.

Models ​

None declared.

Slots ​

NameDescription
emptyAccessible empty-state content shown inside the empty grid.

Slot props: empty ​

None declared.

Exposed members ​

NameTypeDescription
focusCell(cell: import('./ghost-data-grid').DataGridCellKey) => booleanMoves real DOM focus to the cell with these IDs in navigation mode and makes it the `Tab` stop. Discards an open draft without emitting and never opens the editor. Returns `false` when the cell does not exist.

Parts and data attributes ​

AttributeValueDescription
data-partgridThe <table role="grid">. Consumer class, style, and other attributes land here.
data-partrowHeader and body rows.
data-partcolumnheaderColumn header cells. They hold no focusable controls.
data-partcellBody cells, including the row header column (role rowheader).
data-parteditorThe labeled text input rendered inside a cell while it is edited.
data-partcell-errorVisible cellErrors message inside the cell, referenced by aria-describedby.
data-partemptyThe cell holding the empty slot when there are no rows or columns.
data-partstatusVisually hidden polite status element after the grid that announces new cell errors.
data-activetrueOn the remembered active cell (the Tab stop).
data-editingtrueOn the cell whose editor is open.
data-readonlytrueOn read-only cells, together with aria-readonly="true".
data-invalidtrueOn cells with a cellErrors entry.

CSS variables ​

None declared.

Accessibility ​

Role: grid. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/grid/.

Required ARIA attributes: aria-label, aria-readonly.

Keyboard ​

KeyActionAutomated browser test
TabInto the grid: focuses the remembered active cell, or the first data cell in reading order on first entry, or the named empty grid. From a cell, leaves the grid. In the editor, proposes a changed draft once and leaves the grid.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
Shift+TabSame entry target as Tab; leaves the grid backward. In the editor, proposes a changed draft once and leaves backward.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
ArrowRightNavigation: physical right-hand cell in the row (previous in reading order in RTL); stops at the edge. Editing: moves the caret.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › RTL: arrows follow the physical neighbor, Home and End follow reading order, and the editor keeps its caret keys (@ghostvue/vue)
ArrowLeftNavigation: physical left-hand cell in the row (next in reading order in RTL); stops at the edge. Editing: moves the caret.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › RTL: arrows follow the physical neighbor, Home and End follow reading order, and the editor keeps its caret keys (@ghostvue/vue)
ArrowDownNavigation: same column, next displayed row; stops on the last row. Editing: native caret behavior.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
ArrowUpNavigation: same column, previous displayed row; stops on the first row. Editing: native caret behavior.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
HomeNavigation: first cell of the row in reading order. Editing: moves the caret.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › RTL: arrows follow the physical neighbor, Home and End follow reading order, and the editor keeps its caret keys (@ghostvue/vue)
EndNavigation: last cell of the row in reading order. Editing: moves the caret.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › RTL: arrows follow the physical neighbor, Home and End follow reading order, and the editor keeps its caret keys (@ghostvue/vue)
Ctrl+HomeFirst cell of the grid. Ctrl on every platform; Meta chords are left to the browser.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › Page keys on a page-scrolled grid and with rows taller than the viewport (@ghostvue/vue)
Ctrl+EndLast cell of the grid. Ctrl on every platform; Meta chords are left to the browser.GhostDataGrid @component:GhostDataGrid › navigation keys: Tab entry and exit, arrows at every boundary, Home, End, Ctrl+Home, Ctrl+End (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › Page keys on a page-scrolled grid and with rows taller than the viewport (@ghostvue/vue)
PageDownSame column, forward by max(1, n − 1) rows, where n is the number of fully visible body rows at the keypress; clamped and revealed.GhostDataGrid @component:GhostDataGrid › Page Up and Page Down in a scrolled grid viewport, also clipped by the document viewport (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › Page keys on a page-scrolled grid and with rows taller than the viewport (@ghostvue/vue)
PageUpSame column, back by the same step; clamped and revealed.GhostDataGrid @component:GhostDataGrid › Page Up and Page Down in a scrolled grid viewport, also clipped by the document viewport (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › Page keys on a page-scrolled grid and with rows taller than the viewport (@ghostvue/vue)
EnterOn an editable cell, opens its editor with the draft selected; nothing on a read-only cell. In the editor (not composing), closes it, returns focus to the cell, then proposes a changed draft once.GhostDataGrid @component:GhostDataGrid › Enter and F2 open the editor only on editable cells, with the whole draft selected (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › IME: composing Enter and Escape belong to the IME; the next Enter proposes once (@ghostvue/vue)
F2On an editable cell, opens its editor with the draft selected; nothing on a read-only cell.GhostDataGrid @component:GhostDataGrid › Enter and F2 open the editor only on editable cells, with the whole draft selected (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
EscapeIn the editor (not composing), discards the draft and returns focus to the cell, default-prevented so an enclosing dialog stays open. In navigation, unhandled.GhostDataGrid @component:GhostDataGrid › estimate walkthrough: navigation, Escape, unchanged, accept, reject, Tab, outside press (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › Escape in the editor leaves an enclosing dialog open; Escape in navigation closes it (@ghostvue/vue)
GhostDataGrid @component:GhostDataGrid › IME: composing Enter and Escape belong to the IME; the next Enter proposes once (@ghostvue/vue)

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardPassedEvery declared key maps to a Chromium browser test that CI runs and requires to pass on every commit.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

data-grid/basic ​

Example source

Read-only grid Headless

A named grid with one Tab stop and arrow-key, Home/End, and Ctrl+Home/End navigation over read-only cells, with a row header column.

VersionChannelReleased
0.3.0Next2026-12-15
0.2.1Stable2026-11-30
0.2.0Stable2026-11-12

data-grid/estimate-editor ​

Example source

Edit an estimate Headless

Change Build's estimate from 3 to 8: Enter proposes once, the application saves through a per-cell queue and re-sorts the rows, and focus follows Build's Estimate cell to its new row. Estimates over 20 days are rejected with a visible, announced message.

TaskOwnerEstimate
DesignAna2
BuildBen3
TestCy5

Design, owned by Ana: 2 days.

data-grid/locked-rows ​

Example source

Lock some rows Headless

editable as a per-row callback keeps done tasks reachable but read-only, and a cell render hook shows "3 days" while toDraftText opens the editor with the raw number.

TaskStatusEstimate
DesignDone2 days
BuildOpen3 days
TestOpen5 days

data-grid/rejected-edit ​

Example source

Reject an edit Headless

The application leaves data unchanged and sets a cellErrors entry: the cell keeps its value, shows and announces the message, and reopens from the current value with aria-invalid.

TaskEstimate
Design2
Build3

data-grid/rtl ​

Example source

Right-to-left Headless

A grid that inherits dir="rtl": ArrowLeft and ArrowRight follow the physical neighbor, Home and End follow reading order, and the editor owns caret movement.

TaskOwnerEstimate
DesignAna2
BuildBen3
TestCy5