table
БесплатноБез исполняемых скриптовНе проверенDraftForge data tables with TanStack Table v9. Use when showing rows of records (lists with columns, admin queues, logs, stats) or touching DataTable…
от kettleofketchup★ 16 звёзд на GitHubОб этом скилле
DraftForge Data Tables
Record lists render through the shared DataTable (frontend/app/components/ui/data-table/,
TanStack Table v9 on the shadcn ui/table primitives): one shared table, one column
factory per record type, one thin <Domain>Table reused everywhere that type is listed.
Worked example: components/opsnotices/ (opsNoticeColumns.tsx + OpsNoticeTable.tsx).
Brand rule ("lists use DataTable"): docs/theming-guide/ai/references/component-substitutions.md#tables.
The three layers
| Layer | File | Owns |
|---|---|---|
DataTable |
ui/data-table/DataTable.tsx |
feature set, sorting, filtering + toolbar, pagination (hidden when it fits), striping, row click, empty row, table-fixed layout, scrollX |
make<Domain>Columns(options) |
components/<domain>/<domain>Columns.tsx |
every column def, keyed by a <Domain>ColumnId union, plus DEFAULT_<DOMAIN>_COLUMNS |
<Domain>Table |
components/<domain>/<Domain>Table.tsx |
useMemo over the factory, getRowId, test-id prefix, default sort |
Callers pick columns by id (columns={['severity', 'summary', 'actions']}), never re-column per
page. Need another column? Add it to the factory's union.
TanStack v9 specifics
- Features are registered explicitly in
appTableFeatures(tableFeatures({...})inDataTable.tsx). An API that'sundefinedat runtime means its feature isn't listed there. Add a feature (filtering, faceting, grouping, selection) there, opt-in, when a table needs it. - Types carry the feature set: use
AppColumnDef<Row>,AppColumn<Row>,AppRow<Row>from~/components/ui/data-table, never TanStack's bareColumnDef/Column/Row. - Column
metais typed bymetaHelperin the feature set (nodeclare module):headClassName,cellClassName,headTestId. - Custom sort is
sortFn(v8'ssortingFn):(rowA, rowB, columnId) => number. - Read state from
table.state, nottable.getState().
Layout: fit first, scroll by opt-in
- Default is
table-fixed: the table never scrolls sideways. Secondary columns take fixed widths (meta: { headClassName: 'w-24', cellClassName: 'w-24' }); one main column has no width and absorbs the rest. Cells wrap (whitespace-normal break-words). - On small screens, hide secondary columns with
hidden sm:table-cell/md:/lg:on BOTHheadClassNameandcellClassName.DataTablereads those classes (isCellRendered) so the empty row spans only what is rendered. - Don't lose the hidden data: stack it under the main cell for phones
(
<span className="text-xs text-muted-foreground md:hidden">). - Long unbroken tokens (ids, keys) in the main column:
wrap-anywhere. scrollXkeeps every column, sizes to content and scrolls in aScrollFrame(focusable region,scrollLabel, right-edge fade). Use it only when every column must stay visible.
Columns
- Sortable header:
header: ({ column }) => <DataTableColumnHeader column={column} title="Last seen" />. Clicks follow TanStack's order (first direction fromsortDescFirst, numbers default to descending), then unsorted. A plain-string header isn't sortable; also setenableSorting: false. - Single-column sort only. A tie-break (severity, then recency) is that column's
sortFn. - Numbers:
text-right tabular-nums. Secondary text:text-muted-foreground. - States/categories are
Badges with a fixed variant map. - Cell actions are brand buttons (
SecondaryButton size="sm" className="min-h-11 sm:min-h-8"), calle.stopPropagation()so they don't fireonRowClick, and carry${prefix}-<action>-<id>. Inline text links in cells are exempt from the 44px floor; the row is the touch target. - More than one action per row, or rows whose actions differ:
DataTableRowActions. When the table has room (a wide page or full-screen dialog), passinlineFrom="md": from that breakpoint the actions are inlineSecondaryButtons (color="red"when destructive) in arole="group", and below it only a ⋮ menu renders, never both. Size the actions column for the inline buttons from the breakpoint (w-16 sm:w-14 md:w-96). WithoutinlineFromit is always the menu.aria-label"Actions for" and ${prefix}-actions-<id>sit on the group or the trigger; each button or item is${prefix}-<action>-<id>. Keep a disabled action shown with itshint(menu text, or a tooltip plusaria-describedbyinline) rather than hiding it. Tests switch modes withsetViewportWidthfromui/data-table/__tests__/viewport.ts. Worked example:components/team/manage/rosterColumns.tsx. - Table-level actions ("Add …") and a count go on
toolbarActions/toolbarStart(${prefix}-actionsbar), which works withoutenableToolbar.
Test ids
<Domain>Table takes testIdPrefix (default the domain): table ${prefix}-table, rows
${prefix}-row-<id>, actions ${prefix}-<action>-<id>. Sort buttons are
data-table-sort-<columnId>; pagination `data-tabl
Установить table в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл table?
DraftForge data tables with TanStack Table v9. Use when showing rows of records (lists with columns, admin queues, logs, stats) or touching DataTable, AppColumnDef, make*Columns, or a *Table.tsx component.
Как установить скилл table?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл table запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic