getting-started
できること
このスキルは、TanStack Tableを使ってEmberアプリにデータの表を作る方法を示します。表のレイアウトにそのライブラリを使いたいEmberの開発者向けです。
使う場面
- ✓記録の表を表示する必要があるEmberのページを作っているとき。
- ✓表のスタイルとして、Emberのテンプレートタグのコンポーネントを使いたいとき。
- ✓表のデータがトラックされたプロパティに保存されていて、画面で更新される必要があるとき。
スキルのリンク
https://github.com/TanStack/table/blob/main/packages/ember-table/skills/getting-started/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Emberアプリに、ユーザーの一覧を表示する表が必要です。TanStack Tableをどう設定すればよいでしょうか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
列を定義し、表を作り、テンプレートで行とセルをループさせるコンポーネントの例を示します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.
Ember 5.8 or newer requires Embroider or ember-auto-import v2. Prefer .gts or .gjs template-tag components with Glint.
Setup
import Component from '@glimmer/component'
import { tracked } from '@glimmer/tracking'
import {
FlexRenderCell,
createColumnHelper,
tableFeatures,
useTable,
type Cell,
type Row,
} from '@tanstack/ember-table'
type Person = { id: string; name: string }
const features = tableFeatures({})
const columnHelper = createColumnHelper<typeof features, Person>()
const columns = columnHelper.columns([
columnHelper.accessor('name', { header: 'Name' }),
])
const initialData: Person[] = [{ id: '1', name: 'Ada' }]
const getRowId = (row: Person) => row.id
const getAllCells = (
row: Row<typeof features, Person>,
): Array<Cell<typeof features, Person>> => row.getAllCells()
export default class PeopleTable extends Component {
@tracked data = initialData
table = useTable(this, () => ({
features,
columns,
data: this.data,
getRowId,
}))
get rows() {
return this.table.getRowModel().rows
}
<template>
<table>
<tbody>
{{#each this.rows as |row|}}
<tr>
{{#each (getAllCells row) as |cell|}}
<td><FlexRenderCell @cell={{cell}} /></td>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
</template>
}
Construction and rendering
useTable takes an options thunk. Read tracked data inside it, and keep features, atoms, and columns stable. In a component, pass this as the owner to bind external-atom cleanup to the component lifecycle. The one-argument thunk form remains available for standalone tables.
Read Table APIs in template-consumed getters. Column, row, cell, and header prototype methods require their receiver, so use a getter or module helper such as getAllCells(row) rather than an extracted method. Wrap event calls the same way.
Use FlexRenderCell, FlexRenderHeader, and FlexRenderFooter for the matching object. Rendered components receive @ctx and optional @options through flexRenderComponent(Component, options).
With tableFeatures({}), render row.getAllCells(). Register columnVisibilityFeature before switching to row.getVisibleCells().
Read for the task
- When adding or configuring optional features, load
intent load @tanstack/table-core#table-featuresand 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/ember-table/declarations/index.d.ts, use-table.d.ts, signal.d.ts, and FlexRender.d.ts. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.
よくある質問
どのEmberのバージョンが必要ですか?
スキルは、Ember 5.8以降ではEmbroiderまたはember-auto-import v2が必要だとしています。
.gtsファイルを使うべきですか?
型チェックのためにGlintを使い、.gtsまたは.gjsファイルでテンプレートタグのコンポーネントを使うことを勧めています。
表のデータはどこから来ますか?
例では、データをトラックされたプロパティに保存するので、その変更が表に反映されます。
詳細
作者による元の説明
Create and render Table v9 with the ember adapter. Route reusable createTableHook defaults, and framework setup; use table-state for reactive ownership.
repo: TanStack/table
人気
- GitHubのスター
- 29k
- ランキング
- #9811
- ライセンス
- MIT
- 更新日
- 2026/10/21
コメント
- …
このリポジトリの他のスキル
getting-started
29kエージェントが、Alpine.jsでTanStack Tableを使ってデータテーブルを作り、表示する方法を教えます。セットアップ、リアクティブなデータ、行の描画を扱います。
table-state
29kエージェントが、Alpine.jsで表の状態(現在のページなど)を読み取り、制御する方法を教えます。その状態が変わると、画面が更新されます。
devtools
29kエージェントが、Angularの表をTanStack Devtoolsのパネルに登録する方法を教えます。開発者はアプリを作りながら、各表を調べられます。
getting-started
29kエージェントが、AngularでTanStack Tableの表を作り、表示する方法を教えます。injectTableの設定、テンプレートの描画、行データの更新を扱います。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。