INTEGRATIONS / ISSUES

A view of your data.

Use the same issue table with local sample records or your own HTTP service. Saved views and links keep the interface configuration separate from the records.

Start with the complete workflow.

For a complete bounded dataset with grouped scrolling and a separate detail editor, see grouped and large tables. Keep the paged service contract below for server-driven queries.

The issue workspace combines advanced filters, saved views, search, sorting, columns, inline titles, selection across pages, bulk status changes and guarded undo. The default repository keeps sample records in memory; saved views use browser storage.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/issue-table.json

Next.js and Vite starters include the same source. Set syncUrl= when your host application should manage its own query URL. The block otherwise uses only the buiIssues parameter and preserves unrelated parameters and fragments.

Connect a repository.

React / TypeScript
'use client';
import {useMemo} from 'react';
import {IssueTable} from '@bld8/blocks';
import {createIssueHttpRepository} from '@bld8/blocks/issue-repository';

export default function Issues() {
  const repository=useMemo(()=>createIssueHttpRepository('/api/issues'),[]);
  return <div className="bblocks-root"><IssueTable repository={repository}/></div>;
}

Registry installations use the equivalent local bld8/blocks/issue-table and bld8/blocks/issue-repository paths. The adapter passes abort signals, validates responses and normalises service errors. The endpoint belongs to your application; this library does not include production authentication, a database or an issue service.

HTTP contract

Issue service requests and responses
RequestResponse
GET /api/issues?query=…JSON query containing view and one-based page. Return rows and the total matching count.
POST /api/issuesAccept title, priority and assignee; return the created issue with a revision.
PATCH /api/issuesAccept changes containing id, expectedRevision and patch. Validate every revision before atomically applying the batch. Return the updated records.

Every issue includes id, title, status, priority, assignee, numeric estimate, an optional YYYY-MM-DD due date and a positive revision. A revision conflict returns HTTP 409. Rate limiting returns 429; other failures remain recoverable service errors.

React / TypeScript
// The GET query, before URLSearchParams encoding
{
  view: {
    filters: {version:1, match:"all", rules:[
      {id:"status", field:"status", operator:"anyOf", values:["review"]}
    ]},
    search:"", sort:null,
    columns:["title","status","priority"],
    density:"comfortable", pageSize:5
  },
  page:1
}

Evaluate the same filter contract.

React / TypeScript
import {filterRecords,parseFilterQuery} from '@bld8/ui/filter-query';
import {issueFields} from '@bld8/blocks/issue-repository';

const parsed=parseFilterQuery(encodedFilters,issueFields,{allowNested:true});
if (!parsed.query) throw new Error('Invalid filters');
const matches=filterRecords(ownedIssues,parsed.query,issueFields,
  (issue,field)=>issue[field]);

The pure query module can be imported by server code without a React client boundary. Validate the query and allowlist fields on your server. Apply ownership restrictions before evaluation, or translate reviewed operators to your database query builder. The filter model is not SQL and is not authorisation.

Views, links and recovery.

Saved views keep the applied filters, search, sort, visible columns, density and page size. Selection and records are never included in a link. Sharing does include search and filter values, so review the link before distributing it. Local storage is specific to the browser origin.

Requests are abortable and stale list completions are ignored. Failed writes keep the selection or edit draft. Bulk undo uses the returned revision and refuses to overwrite a later edit. Provide safe, user-facing repository errors and enforce the same revision contract in the backend.

Version 1 flat queries remain supported. Version 2 adds bounded nested all/any groups and group exclusion, alongside text matching, multi-value choices, numeric comparisons and date-only ranges. Empty nested groups remain invalid drafts. Read nested filter migration and limits before evaluating saved queries; database-specific query generation belongs to the host.