मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)29k · #9806

table-state

यह क्या करती है

यह स्किल समझाती है कि टेबल की सेटिंग, जैसे कौन सा पेज दिख रहा है, कैसे ट्रैक करें और Alpine.js पेज में उन्हें कैसे अपडेट करें। यह उन डेवलपरों के लिए है जिन्हें टेबल और बाकी पेज एक-दूसरे के साथ रखने हैं।

कब इस्तेमाल करें

  • ✓जब टेबल का मौजूदा पेज या कोई दूसरी सेटिंग किसी बटन या लेबल में दिखानी हो।
  • ✓जब आप अपने कोड से टेबल की स्थिति का कोई हिस्सा नियंत्रित करना चाहें।
  • ✓जब स्थिति बदलने के बाद टेबल स्क्रीन पर अपडेट न हो।

Skill का लिंक

https://github.com/TanStack/table/blob/main/packages/alpine-table/skills/table-state/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/TanStack/table/blob/main/packages/alpine-table/skills/table-state/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरी Alpine.js टेबल में next पर क्लिक करने के बाद पेज नंबर अपडेट नहीं होता। इसे कैसे ठीक करूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह दिखाती है कि getter और callback के साथ नियंत्रित स्थिति कैसे दें, ताकि Alpine नवीनतम मान पढ़े और मान बदलने पर स्क्रीन अपडेट हो।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Load intent load @tanstack/table-core#table-state first for shared ownership, initialization, updater, and reset rules.

Alpine's table proxy makes reads inside x-text, x-for, x-if, bound attributes, x-effect, and Alpine getters reactive. Event handlers read the current value when invoked. A captured value outside a binding does not become a continuing subscription, and there is no table.Subscribe component.

Controlled getter setup

<!-- skill-snippet:check -->
import Alpine from 'alpinejs'
import {
  createTable,
  rowPaginationFeature,
  tableFeatures,
  type PaginationState,
} from '@tanstack/alpine-table'

const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]
const data = [{ name: 'Ada' }]

Alpine.data('pagedTable', () => {
  const local = Alpine.reactive<{ pagination: PaginationState }>({
    pagination: { pageIndex: 0, pageSize: 10 },
  })
  const table = createTable({
    features,
    columns,
    data,
    state: {
      get pagination() {
        return local.pagination
      },
    },
    onPaginationChange: (next) => {
      local.pagination =
        typeof next === 'function' ? next(local.pagination) : next
    },
  })
  return { table }
})

Read table.atoms.pagination.get().pageIndex directly in an Alpine binding.

Reactive boundaries

  • A controlled slice needs a getter and callback. state: { pagination: local.pagination } captures the old object when the owner later replaces it.
  • Expose changing data through get data() and keep features, columns, and derived data stable outside reevaluated getters.
  • The proxy normally reevaluates all Table-reading bindings for every state change. A narrow atom read does not by itself narrow that broad invalidation.
  • For shared state, pass a stable external atom through atoms; omit controlled state and its callback for the same slice.

Read for the task

For advanced reactive boundaries, shared atoms, or detailed subscription examples, read reactivity. For construction or rendering setup, read getting-started.

API discovery

Inspect node_modules/@tanstack/alpine-table/dist/index.d.ts, createTable.d.ts, and reactivity.d.ts. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.

अक्सर पूछे जाने वाले सवाल

स्थिति बदलने पर मेरी टेबल क्यों ताज़ा नहीं होती?

अक्सर डेटा या स्थिति एक बार कॉपी कर ली गई होती है, getter से नहीं पढ़ी जाती, इसलिए Alpine बाद के बदलाव नहीं देख पाता।

क्या मैं click handler के अंदर कोई मान एक बार पढ़ सकता हूँ?

हाँ। event handlers चलने के समय का मौजूदा मान पढ़ते हैं।

क्या यह मुख्य टेबल गाइड की जगह लेती है?

नहीं। यह मुख्य गाइड के साझा स्वामित्व और रीसेट नियमों के ऊपर Alpine-विशिष्ट नियम जोड़ती है।

जानकारी

लेखक का मूल विवरण

Read and control Table v9 state in alpine. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.

repo: TanStack/table

लोकप्रियता

GitHub स्टार
29k
रैंकिंग में स्थान
#9806
लाइसेंस
MIT
अपडेट की गई
21/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

getting-started

29k

यह आपके एजेंट को Alpine.js में TanStack Table से डेटा टेबल बनाना और दिखाना सिखाती है, जिसमें सेटअप, रिएक्टिव डेटा और पंक्तियाँ दिखाना शामिल है।

कोडिंगवेबसाइट और UI (frontend)

devtools

29k

यह आपके एजेंट को Angular टेबल को TanStack Devtools पैनल में रजिस्टर करना सिखाती है, ताकि डेवलपर ऐप बनाते समय हर टेबल की जांच कर सकें।

कोडिंगवेबसाइट और UI (frontend)

getting-started

29k

यह आपके एजेंट को Angular में TanStack टेबल बनाना और दिखाना सिखाती है, जिसमें injectTable सेटअप, टेम्प्लेट रेंडरिंग और पंक्ति डेटा के अपडेट शामिल हैं।

कोडिंगवेबसाइट और UI (frontend)

migrate-v8-to-v9

29k

यह आपके एजेंट को Angular टेबल को TanStack Table v8 से v9 पर ले जाने में मदद करती है, सेटअप, रेंडरिंग, स्थिति और hooks को माइग्रेशन जांच सूची से मिलाकर।

कोडिंगवेबसाइट और UI (frontend)

मिलती-जुलती skills