Zum Inhalt springen
Skillpedia
Websites & UI (Frontend)29k · #9817

getting-started

Was er macht

Dieser Skill zeigt, wie du in einer Octane-App mit TanStack Table eine Datentabelle baust. Er ist für Entwickler gedacht, die Octane und seine TSRX-Vorlagensyntax nutzen.

Wann du ihn nutzt

  • ✓Wenn du eine Octane-Seite baust, die eine Liste von Datensätzen in einer Tabelle zeigt.
  • ✓Wenn die Tabelle Kopfzeilen und Zellen über ihre Render-Funktion anzeigen soll.
  • ✓Wenn du die Spalten der Tabelle mit einem Spalten-Helfer in einer TSRX-Datei definieren willst.

Link zum Skill

https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Ich baue eine Octane-Seite, die eine Liste von Produkten in einer Tabelle zeigt. Wie richte ich das ein?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Er liefert eine Beispielkomponente mit Spalten und Daten und läuft dann über Kopfzeilen, Zeilen und Zellen im Markup, um sie auf der Seite anzuzeigen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.

Setup

import { createRoot, useState } from 'octane'
import {
  createColumnHelper,
  tableFeatures,
  useTable,
} from '@tanstack/octane-table'

type Person = { name: string }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])

function PeopleTable() @{
  const [data] = useState<Person[]>([{ name: 'Ada' }])
  const table = useTable({ features, columns, data })

  <table>
    <thead>
      @for (const group of table.getHeaderGroups(); key group.id) {
        <tr>
          @for (const header of group.headers; key header.id) {
            <th><table.FlexRender header={header} /></th>
          }
        </tr>
      }
    </thead>
    <tbody>
      @for (const row of table.getRowModel().rows; key row.id) {
        <tr>
          @for (const cell of row.getAllCells(); key cell.id) {
            <td><table.FlexRender cell={cell} /></td>
          }
        </tr>
      }
    </tbody>
  </table>
}

const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Root element not found')
createRoot(rootElement).render(PeopleTable)

Construction and rendering

This adapter distributes authored TypeScript and TSRX. Configure the consumer with octane() in vite.config.ts and the TSRX JSX import source octane. Author component bodies with @{ ... } and keyed @for loops for rows, headers, and cells.

Import from @tanstack/octane-table. Render table.FlexRender as a component so it gets its own Octane scope. It preserves numbers including 0, render descriptors, and component functions.

Keep features and column definitions at module scope. For inputs that depend on component state, use useMemo; pass the current stable data array to useTable. Convert non-renderable values with String(value) when displaying them as text.

Read for the task

  • When adding or configuring optional features, load intent load @tanstack/table-core#table-features and read only references for the requested behavior.
  • For state ownership or reactive reads, read table-state.
  • When tables share features, defaults, or reusable UI, read create-table-hook.

API discovery

Inspect node_modules/@tanstack/octane-table/src/index.d.ts, the matching *.tsrx.d.ts sidecar, and src/types.ts. This package publishes authored source; core APIs are in installed @tanstack/table-core/dist/.

Häufige Fragen

Was ist TSRX?

Die Beispiele sind in TSRX geschrieben, der Komponentensyntax dieses Adapters, daher sehen sie anders aus als normales JSX.

Woher bekommt die Tabelle ihre Daten?

Das Beispiel hält die Daten im Octane-Zustand mit useState und übergibt sie an die Tabelle.

Ersetzt das den Kernleitfaden zu Tabellen?

Nein. Es setzt voraus, dass du zuerst den Kernleitfaden zum kopflosen Tabellenmodell gelesen hast.

Details

Originalbeschreibung des Autors

Create and render Table v9 with the octane adapter. Route reusable createTableHook components, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

Beliebtheit

GitHub-Sterne
29k
Platz im Ranking
#9817
Lizenz
MIT
Aktualisiert
21.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills