本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)29k · #9837

table-features

できること

テーブルの機能を有効にし、期待どおり動かないときに直す方法を説明します。ライブラリで作ったテーブルに、ソートやフィルター、ページ送りを付けたい開発者向けです。

使う場面

  • ✓TanStackのテーブルに、ソート、フィルター、ページ送り、選択を追加したいとき。
  • ✓ソートなどの機能が効かないように見え、その登録を確認する必要があるとき。
  • ✓ある行モデルやソート関数に、どの機能が必要かを知りたいとき。

スキルのリンク

https://github.com/TanStack/table/blob/main/packages/table-core/skills/table-features/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/TanStack/table/blob/main/packages/table-core/skills/table-features/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“TanStackのテーブルにソートを追加しましたが、ヘッダーをクリックしても何も起きません。直し方を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

各機能とその行モデルを機能リストに登録する方法を示します。テーブルは登録された機能の動作しか持たないため、それぞれの前提条件も説明します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Feature architecture

Read core first for the headless model and stable inputs.

Register the behavior the table uses

<!-- skill-snippet:check -->
import {
  createSortedRowModel,
  rowSortingFeature,
  sortFn_alphanumeric,
  tableFeatures,
} from '@tanstack/table-core'

export const features = tableFeatures({
  rowSortingFeature,
  sortedRowModel: createSortedRowModel(),
  sortFns: { alphanumeric: sortFn_alphanumeric },
})

Pass the stable features object to the installed adapter constructor. The concrete registry determines optional APIs, options, state slices, and their types. The core row model is automatic; a custom core model uses coreRowModel.

Registration rules

  • Register each prerequisite feature before its dependent slot in the same tableFeatures call. A processing factory alone cannot install that feature's APIs or state.
  • Row-model factories use create*RowModel() feature slots. Their names and prerequisites are in the feature reference. They take no function-registry arguments.
  • filterFns, sortFns, and aggregationFns are feature slots, not table options. They require columnFilteringFeature, rowSortingFeature, and rowAggregationFeature, respectively.
  • Import individual built-ins such as sortFn_alphanumeric and register their conventional keys. Those keys become typed string names; 'auto' can resolve only registered functions. Pass a function directly when a column needs no named registry entry. Full registry exports bundle every built-in.
  • columnResizingFeature requires columnSizingFeature; globalFilteringFeature requires columnFilteringFeature. Check installed FeatureSlotPrereqs for other dependencies.
  • Use explicit features for normal construction. stockFeatures is a deliberate all-features convenience or temporary migration aid, with the corresponding bundle cost.

A missing API can mean missing registration. Check the concrete feature object before casting, recreating an API, or assuming v9 removed it.

Select references by the requested change

Read only references needed for the requested behavior and its dependencies, including features being added. An unrelated feature already registered on the table does not make its reference necessary.

Task involves Read
Manual modes, server data, mixed row-processing stages, or dataset scope Client/server ownership
Totals, multiple aggregations, grouped aggregate values, or custom aggregate definitions Aggregation
Facet option counts, numeric ranges, or incomplete server facets Column faceting
Per-column filters, filter functions, metadata, or nested-row filtering Column filtering
Group rows, placeholders, or grouping with expansion/pagination Grouping
Drag ordering or leaf-column order differing from state Column ordering
Sticky column regions, logical start/end, or pinning gaps Column pinning
Drag resize handles, gesture events, or resize performance Column resizing
Numeric widths, min/max limits, or model/CSS size mismatch Column sizing
Hidden columns, visibility-aware rendering, or hiding controls Column visibility
A search across columns or global-filter eligibility Global filtering
Hierarchical subrows, detail panels, or expansion/page interaction Expanding
Page slicing, counts, navigation, or page-index resets
よくある質問

コードを書いたのに機能が動かないのはなぜですか?

機能はテーブルの機能リストに登録する必要があり、別の機能を先に登録しなければならないものもあるからです。

ソート関数とフィルター関数はどこに書きますか?

通常のテーブルオプションではなく、機能リストの機能スロットに置くと説明しています。

すべての機能の参考資料を読む必要がありますか?

いいえ。作業内容に合った資料だけを読むよう勧めています。

詳細

作者による元の説明

'Add or debug Table v9 features: registration, row-model slots, prerequisites, sorting, filtering, pagination, selection, spanning, and column layout. Read only task-relevant feature references.'

repo: TanStack/table

人気

GitHubのスター
29k
ランキング
#9837
ライセンス
MIT
更新日
2026/10/21

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル