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

table-state

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

यह स्किल समझाती है कि Ember ऐप में पेज जैसी टेबल सेटिंग tracked properties में कैसे रखें। यह उन डेवलपरों के लिए है जो चाहते हैं कि ये सेटिंग टेम्प्लेट से मेल में रहें।

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

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

Skill का लिंक

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

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

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

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

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

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

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

“मेरी Ember टेबल का अगला पेज बटन दबाने पर पेज नंबर स्क्रीन पर कैसे अपडेट करूँ?”

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

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

यह दिखाती है कि पेजिनेशन सेटिंग को tracked property में कैसे रखें, उसे टेबल को दें, और callback से उसे अपडेट करें।

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

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

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

Glimmer tracks Table APIs, atom reads, and store-property reads inside template-consumed getters. A value cached outside tracked consumption is only a snapshot. There is no table.Subscribe or selector argument to useTable; table.store.subscribe is intentionally a no-op and cannot drive rendering.

Controlled tracked setup

import Component from '@glimmer/component'
import { tracked } from '@glimmer/tracking'
import { on } from '@ember/modifier'
import {
  rowPaginationFeature,
  tableFeatures,
  useTable,
  type PaginationState,
} from '@tanstack/ember-table'

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

export default class PageStatus extends Component {
  @tracked pagination: PaginationState = { pageIndex: 0, pageSize: 10 }
  table = useTable(this, () => ({
    features,
    columns,
    data,
    state: { pagination: this.pagination },
    onPaginationChange: (next) => {
      this.pagination =
        typeof next === 'function' ? next(this.pagination) : next
    },
  }))

  get pageNumber() {
    return this.table.atoms.pagination.get().pageIndex + 1
  }

  nextPage = () => this.table.nextPage()

  <template>
    <button type='button' {{on 'click' this.nextPage}}>Page
      {{this.pageNumber}}</button>
  </template>
}

Reactive boundaries

  • Read tracked values inside the options thunk and assign callback results back to their tracked owner. Mutating this.pagination.pageIndex++ does not notify the thunk.
  • features and atoms are construction-time inputs. Updating ordinary live options does not replace the feature set or atom owners; create them once before useTable.
  • Pass the component as the owner for lifecycle cleanup when external atoms are used. The standalone one-argument thunk form remains supported.
  • Use the adapter's createAtom for external Glimmer-reactive ownership. Read it in a tracked getter and use feature APIs or the external atom to write.
  • Keep features, columns, and data stable. Call receiver-dependent methods through getters or helpers rather than passing extracted methods to templates.

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/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/.

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

टेम्प्लेट के बाहर पढ़े मान अपडेट क्यों नहीं होते?

tracked उपभोग के बाहर कैश किए मान सिर्फ़ स्नैपशॉट होते हैं, इसलिए वे अपने-आप ताज़ा नहीं होते।

क्या Ember में Subscribe component है?

नहीं। स्किल कहती है कि Subscribe component नहीं है, और store subscription रेंडरिंग को नहीं चलाती।

क्या मैं कोड में अब भी मौजूदा पेज पढ़ सकता हूँ?

हाँ। आप उसे एक getter में पढ़ सकते हैं जिसे टेम्प्लेट इस्तेमाल करता है।

जानकारी

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

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

repo: TanStack/table

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

getting-started

29k

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

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

table-state

29k

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

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

devtools

29k

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

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

getting-started

29k

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

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

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