getting-started
Skill này làm gì
Skill này chỉ cách tạo và hiển thị một bảng dữ liệu trong ứng dụng Solid bằng TanStack Table. Skill dành cho lập trình viên Solid muốn tự xây dựng bố cục bảng của mình.
Khi nào nên dùng
- ✓Khi bạn đang xây dựng một component Solid hiển thị danh sách bản ghi trong bảng.
- ✓Khi dữ liệu bảng Solid của bạn đến từ một signal và phải cập nhật trên màn hình.
- ✓Khi bạn muốn thêm tính năng truy vấn hoặc virtual cho bảng Solid.
Liên kết skill
https://github.com/TanStack/table/blob/main/packages/solid-table/skills/getting-started/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi đang xây dựng một trang Solid liệt kê các đơn hàng trong bảng. Làm sao để thiết lập?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đưa ra một ví dụ component định nghĩa các cột, tạo bảng bằng createTable và lặp qua tiêu đề, dòng và ô bằng component For.
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.
Solid Table setup and integration
Before starting, run intent load @tanstack/table-core#core for the shared headless model and stable-input rules.
Setup
import { For, createSignal } from 'solid-js'
import {
createColumnHelper,
createTable,
tableFeatures,
} from '@tanstack/solid-table'
type Person = { name: string }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
export function PeopleTable() {
const [data] = createSignal<Person[]>([{ name: 'Ada' }])
const table = createTable({
features,
columns,
get data() {
return data()
},
})
return (
<table>
<thead>
<For each={table.getHeaderGroups()}>
{(group) => (
<tr>
<For each={group.headers}>
{(header) => (
<th>
<table.FlexRender header={header} />
</th>
)}
</For>
</tr>
)}
</For>
</thead>
<tbody>
<For each={table.getRowModel().rows}>
{(row) => (
<tr>
<For each={row.getAllCells()}>
{(cell) => (
<td>
<table.FlexRender cell={cell} />
</td>
)}
</For>
</tr>
)}
</For>
</tbody>
</table>
)
}
Essential constraints
Use createTable in a Solid owner. Preserve changing data with get data() { return data() }; data: data() captures a snapshot. Keep features and columns stable and derive transformed arrays with createMemo.
Table owns models and state. The application owns markup, CSS, interactions, and accessibility. Core-only tables use row.getAllCells(); visibility-aware methods need columnVisibilityFeature. Optional state and APIs require their features. Put row-model slots after their prerequisite features in tableFeatures().
Load by task
- For repeated features, defaults, typed contexts, or component registries, read reusable app hooks.
- For Query-backed data, server pages, sorting, filtering, or request keys, read TanStack Query integration.
- For virtual rows, columns, dynamic measurement, or infinite scrolling, read TanStack Virtual integration.
- For controlled state, tracked reads, or render subscriptions, read table state.
- For feature registration, missing feature APIs, or processing ownership, run
intent load @tanstack/table-core#table-featuresand read only references needed by the task. - For v8 code, read the migration checklist.
API discovery
Inspect node_modules/@tanstack/solid-table/dist/index.d.ts, then the exported adapter declarations for the installed version. Inspect optional core APIs under node_modules/@tanstack/table-core/dist/features/.
Câu hỏi thường gặp
Hàm nào tạo bảng trong Solid?
Skill dùng createTable từ adapter Solid, được gọi bên trong component.
Dữ liệu thay đổi được truyền tới bảng như thế nào?
Ví dụ truyền dữ liệu qua một getter, nên bảng luôn đọc giá trị signal mới nhất.
Tôi có cần đọc thêm hướng dẫn core không?
Có. Skill yêu cầu bạn đọc trước hướng dẫn core dùng chung về mô hình headless và quy tắc đầu vào ổn định.
Chi tiết
Mô tả gốc của tác giả
Create and render Table v9 with the solid adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.
repo: TanStack/table
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9828
- Giấy phép
- MIT
- Cập nhật
- 21/10/2026
Bình luận
- …
Thêm skill từ kho mã này
getting-started
29kHướng dẫn agent của bạn cách tạo và hiển thị bảng dữ liệu với TanStack Table trong Alpine.js, gồm thiết lập, dữ liệu phản ứng và hiển thị các hàng.
table-state
29kHướng dẫn agent của bạn cách đọc và điều khiển trạng thái bảng trong Alpine.js, như trang hiện tại, để màn hình cập nhật khi trạng thái đó thay đổi.
devtools
29kHướng dẫn agent của bạn cách đăng ký bảng Angular với bảng điều khiển TanStack Devtools, để lập trình viên có thể kiểm tra từng bảng trong khi xây dựng ứng dụng.
getting-started
29kHướng dẫn agent của bạn cách tạo và hiển thị bảng TanStack trong Angular, gồm thiết lập injectTable, hiển thị trong template và cập nhật dữ liệu hàng.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.