Data workspace.
Edit a range, review the changes and save one revision-checked batch.
ONE DRAFT. ONE CLEAR SAVE.
Work through the details.
Connected through your data source. Changes stay in a draft until you save.
Loading records…
No loaded records match this view.
Save pending edits before leaving or reloading this page.
Live interface · sample data · state resets on reload
GET STARTED
Source you can customise.
npx shadcn@latest add https://ui.bld8.dev/r/data-workspace.jsonInstall into an existing application, or download the complete starter below.
Download the starter, unzip it and run the commands below. Choose Next.js or React + Vite. Both include the same BLD8 packages and editable source. No BLD8 npm installation is needed.
npm install
npm run devNext.js opens on http://localhost:3000; Vite opens on http://127.0.0.1:5173. Use the port printed by the dev server if the default is occupied. Node 22.13+ and React 19 are used. Import DataWorkspace from @bld8/blocks in your own composition.
Moving between Next.js and Vite? Keep the UI source and review the application-specific changes.
NOTES TO SELF
A clear starting point.
A complete Issue data workflow with nested filters, ordered multi-sort, service paging, typed editing, bounded cell-range clipboard operations, local draft undo/redo, review and atomic saves. Invalid values remain editable. Failed saves retain drafts; conflicts show newer server records and require explicit rebase. The default source uses illustrative in-memory records and resets on reload. Supply a stable DataSource<Issue> for your service. Separate Next.js and Vite HTTP reference downloads persist one atomic snapshot on a local disk; they require a single Node server and are not an authentication service or a multi-instance database. Optional onUploadFile returns acknowledgements for the inspected record; attachment persistence remains a separate host transaction. Basic DataTable installs do not depend on the advanced grid.
Original BLD8 source uses MIT. Personal and commercial use are allowed; preserve the copyright, licence and applicable third-party notices when sharing source.
Licence and usage Source manifestPublic API
Generated from the same public TypeScript exports as the agent documentation. The host owns the service contracts described above.
DataWorkspace
| Prop | Type | Default |
|---|---|---|
className | string | undefined | — |
dataSource | DataSource<Issue> | undefinedStable service adapter. The default uses authored records in memory. | — |
onUploadFile | ((file: globalThis.File, context: UploadFileContext & { recordId: string; }) => Promise<UploadReceipt>) | undefinedThe host receives the inspected record ID and owns authorisation/storage. | — |
ResourceWorkspace
| Prop | Type | Default |
|---|---|---|
columnsRequired | readonly DataColumn<T>[] | — |
dataSourceRequired | DataSource<T>Keep the adapter stable. It owns permission checks and atomic persistence. | — |
fieldsRequired | readonly ResourceFilterField<T>[] | — |
className | string | undefined | — |
defaultView | ResourceWorkspaceView | undefinedDefault query and layout, read once for each source/schema binding. Contains no drafts. | — |
formatValue | ((column: DataColumn<T>, value: unknown) => string) | undefined | — |
gridView | DataGridViewState | undefined | — |
labels | Partial<ResourceWorkspaceLabels> | undefined | — |
onGridViewChange | ((view: DataGridViewState) => void) | undefined | — |
onSaveView | ((view: ResourceWorkspaceView) => void | Promise<void>) | undefined | — |
onShareView | ((view: ResourceWorkspaceView) => void | Promise<void>) | undefined | — |
onUploadFile | ((file: globalThis.File, context: UploadFileContext & { recordId: string; }) => Promise<UploadReceipt>) | undefined | — |
renderField | ((context: ResourceFieldContext<T>) => ReactNode) | undefinedReturn undefined to use the built-in editor. Render fields, not a nested form. | — |
renderGrid | ((props: DataGridProps<T>) => ReactNode) | undefinedReplace the grid without replacing the source-bound transaction controller. | — |
renderInspector | ((context: ResourceInspectorContext<T>) => ReactNode) | undefined | — |
savedViews | readonly SavedResourceView[] | undefined | [] |
useResourceWorkspace
| Prop | Type | Default |
|---|---|---|
columnsRequired | readonly DataColumn<T>[] | — |
dataSourceRequired | DataSource<T> | — |
fieldsRequired | readonly ResourceFilterField<T>[] | — |
createRequestId | (() => string) | undefined | — |
initialQuery | DataQuery | undefined | — |
unavailableMessage | string | undefined | — |
Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.