Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)29k · #9837

table-features

Skill này làm gì

Skill này giải thích cách bật các tính năng của bảng và sửa khi chúng không hoạt động như mong đợi. Skill dành cho lập trình viên muốn có sắp xếp, lọc hoặc phân trang trong bảng được xây bằng thư viện.

Khi nào nên dùng

  • ✓Khi bạn cần thêm sắp xếp, lọc, phân trang hoặc chọn cho một bảng TanStack.
  • ✓Khi một tính năng như sắp xếp dường như không làm gì và bạn cần kiểm tra việc đăng ký của nó.
  • ✓Khi bạn cần biết tính năng nào mà row model hoặc hàm sắp xếp yêu cầu.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/TanStack/table/blob/main/packages/table-core/skills/table-features/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi đã thêm sắp xếp vào bảng TanStack, nhưng bấm vào tiêu đề cột không có tác dụng. Làm sao để sửa?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chỉ cách đăng ký từng tính năng và row model của nó trong danh sách tính năng, vì bảng chỉ có hành vi mà nó đã đăng ký, và giải thích điều kiện tiên quyết của từng tính năng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Vì sao một tính năng không hoạt động dù tôi đã viết mã cho nó?

Skill nói tính năng phải được đăng ký trong danh sách tính năng của bảng, và một số tính năng cần tính năng khác được đăng ký trước.

Hàm sắp xếp và lọc đặt ở đâu?

Skill nói chúng là các slot tính năng trong danh sách tính năng, không phải option thường của bảng.

Tôi có cần đọc mọi tài liệu tham chiếu tính năng không?

Không. Skill khuyên chỉ đọc những tài liệu phù hợp với công việc.

Chi tiết

Mô tả gốc của tác giả

'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

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9837
Giấy phép
MIT
Cập nhật
21/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự