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

custom-features

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

यह स्किल दिखाती है कि दोबारा इस्तेमाल होने वाला फ़ीचर, यानी प्लगइन, कैसे बनाएँ जो TanStack Table में नई स्थिति या व्यवहार जोड़े। यह उन उन्नत डेवलपरों के लिए है जिनकी ज़रूरतें अंतर्निहित फ़ीचर कवर नहीं करते।

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

  • ✓जब आपको दोबारा इस्तेमाल होने वाली स्थिति या व्यवहार टेबल ऑब्जेक्ट में जोड़ना हो।
  • ✓जब अंतर्निहित विकल्प और typed meta आपके renderer या ऐप की सेटिंग नहीं संभाल सकते।
  • ✓जब आप ऐसा प्लगइन लिख रहे हों जिसे lifecycle hooks और टेबल methods सही तरीके से रजिस्टर करने हों।

Skill का लिंक

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

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

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

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

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

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

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

“मुझे जो चाहिए वह TanStack Table के अंतर्निहित फ़ीचर कवर नहीं करते। मैं अपना प्लगइन कैसे लिखूँ?”

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

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

यह फ़ीचर घोषित करने, उपयोगकर्ता की स्थिति सुरक्षित रखने, lifecycle hooks के दौरान टेबल और ऑब्जेक्ट methods जोड़ने, और एक स्थिर फ़ीचर ऑब्जेक्ट से प्लगइन रजिस्टर करने के चरण दिखाती है।

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

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

Author a custom feature

Read core and feature architecture first. Use a plugin for reusable state or behavior that must augment Table objects. Built-in options and typed tableMeta/columnMeta are usually enough for renderer callbacks and application configuration.

Implementation workflow

  1. Identify the state, options, and object methods the behavior owns. If it only passes callbacks or renderer data, read scoped meta typing and use meta instead.
  2. Before declaring plugin types or writing lifecycle hooks, read the complete plugin example. It enumerates all 10 public FeatureMaps, the API assignment helpers, lifecycle ordering, and the advanced row-model maps.
  3. Declare the feature key in Plugins. Merge only FeatureMaps with matching runtime implementations; declarations alone install no behavior.
  4. Preserve user state after defaults in getInitialState; connect state updaters in default options. Install table methods with assignTableAPIs and object methods with assignPrototypeAPIs inside the corresponding lifecycle hooks.
  5. Keep the feature object and tableFeatures({ customFeature }) result stable. Register the plugin through tableFeatures so inference and composition include it.
  6. Verify the advertised state, options, methods, and resets on a constructed table. Each declared API must exist at runtime; reset behavior must respect the state owner.

Lifecycle boundaries

Use initTableInstanceData for mutable data owned by one table and resetTableInstanceData for clearing its transient contents. All feature initialization finishes before any constructTableAPIs hook. Keep method installation separate from data allocation.

Prototype methods are shared across the table's rows, columns, cells, or headers. Read per-object values through the method's current instance, and use the supported instance-data hooks for mutable fields. Read the example's installation rules before adding memoized methods or advanced row-model/cache wiring.

Common failures

  • Types without matching runtime hooks advertise APIs that do not exist.
  • Ad hoc mutation of constructed instances bypasses feature registration and inferred composition.
  • Treating the density example as the only extension pattern misses column definitions and the other public FeatureMaps. Choose the maps required by the behavior; advanced row-model declarations also require runtime pipeline/cache wiring.

Installed API discovery

Inspect node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts, the exported *_FeatureMap interfaces in dist/types/, and assignTableAPIs/assignPrototypeAPIs in dist/utils.d.ts. Follow declarations under dist/features/ for comparable stock lifecycle signatures.

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

कस्टम फ़ीचर कब नहीं लिखना चाहिए?

स्किल कहती है कि अगर व्यवहार सिर्फ़ callbacks या renderer का डेटा पास करता है, तो typed meta इस्तेमाल करें।

क्या फ़ीचर type घोषित करने से उसका व्यवहार लागू हो जाता है?

नहीं। स्किल कहती है कि सिर्फ़ घोषणाएँ कुछ लागू नहीं करतीं, इसलिए रनटाइम implementations घोषित types से मेल खानी चाहिए।

प्लगइन कहाँ रजिस्टर होना चाहिए?

tableFeatures कॉल के ज़रिए, ताकि type inference और composition उसे शामिल करें।

जानकारी

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

Implement a Table v9 plugin when built-ins and typed meta are insufficient. Covers FeatureMaps, runtime lifecycle hooks, prototypes, and a complete checked example.

repo: TanStack/table

लोकप्रियता

GitHub स्टार
29k
रैंकिंग में स्थान
#9835
लाइसेंस
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