Data grid example

Issue editing on the same resource controller.

Keep the issue schema and existing HTTP boundary while sharing the resource draft, retry, conflict and undo lifecycle. This example uses the issue adapter in memory.

Complete React client module · MIT · Next.js and Vite

Interactive example

Issue editing on the same resource controller

Keep the issue schema and existing HTTP boundary while sharing the resource draft, retry, conflict and undo lifecycle. This example uses the issue adapter in memory.

Keyboard

  • Use the search field and pagination to move between loaded issue pages. Drafts from other pages are kept.
  • Enter edits a grid cell; Open record opens the issue inspector.
  • Review changes and Save confirm the whole batch. Keep editing returns without writing.

States covered

  • existing issue adapter
  • shared generic controller
  • stable issue wrapper
  • draft undo
  • review before write
  • typed filter schema

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-resource-issues-shared-controller.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import { useState } from 'react';
import { ResourceWorkspace, createMemoryIssueDataSource, issueDataColumns, issueFields, type Issue, type ResourceFilterField } from '@bld8/blocks';
import { UIProvider } from '@bld8/ui';
export default function ResourceIssuesExample() {
  const [source] = useState(() => createMemoryIssueDataSource());
  return <UIProvider><ResourceWorkspace dataSource={source} columns={issueDataColumns} fields={issueFields as readonly ResourceFilterField<Issue>[]}
    labels={{ label: 'Shared issue workspace', gridLabel: 'Shared issue grid', recordName: 'Issue', searchLabel: 'Search issues', title: 'One review for the issue draft.' }}
  /></UIProvider>;
}