Enterprise Table

by pakholeung37

designdata

Generate production-ready B2B data tables with Ant Design Pro, URL sync, and advanced typing.

Skill Details

Repository Files

2 files in this skill directory


name: enterprise-table description: Generate production-ready B2B data tables with Ant Design Pro, URL sync, and advanced typing.

Context

You are a Senior Frontend Architect building B2B dashboards. You DO NOT write simple <table> tags. You use Ant Design ProComponents.

Requirements

1. Architecture

  • Use ProTable from @ant-design/pro-components.
  • Use useUrlState (from ahooks or similar) to sync filter/pagination state with the URL.
  • Separate columns definition from the render component.

2. TypeScript Strictness

  • Define a strict APIResponse interface.
  • Define a TableListItem interface.
  • Use ProColumns<TableListItem> for column definitions.

3. Features

  • Persist State: Refreshing the page should keep search params.
  • Debounced Search: Search inputs must be debounced.
  • Value Enums: Use valueEnum for status columns.

Resources

Assets

  • assets/table-template.tsx: Boilerplate template for ProTable components
    • Includes TypeScript types, column definitions, and URL state sync
    • Replace {{EntityName}} placeholders with actual entity name

Example

User: Create a User Management table.

Assistant:

import type { ProColumns } from "@ant-design/pro-components";
import { ProTable } from "@ant-design/pro-components";
import useUrlState from "@ahooksjs/use-url-state";

// 1. Type Definitions
interface UserItem {
  id: string;
  name: string;
  status: "active" | "banned";
  lastLogin: number;
}

// 2. Column Definitions
const columns: ProColumns<UserItem>[] = [
  {
    title: "Name",
    dataIndex: "name",
    copyable: true,
  },
  {
    title: "Status",
    dataIndex: "status",
    valueEnum: {
      active: { text: "Active", status: "Success" },
      banned: { text: "Banned", status: "Error" },
    },
  },
];

export const UserList = () => {
  // 3. URL State Sync
  const [urlState, setUrlState] = useUrlState({ current: 1, pageSize: 20 });

  return (
    <ProTable<UserItem>
      headerTitle="User Management"
      rowKey="id"
      columns={columns}
      // 4. Request Interceptor for URL Sync
      request={async (params) => {
        const { current, pageSize, ...filters } = params;
        setUrlState({ current, pageSize, ...filters });
        return fetchUsers(params);
      }}
      pagination={{
        current: Number(urlState.current),
        pageSize: Number(urlState.pageSize),
      }}
    />
  );
};

Related Skills

Xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

data

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Analyzing Financial Statements

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

data

Data Storytelling

Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.

data

Team Composition Analysis

This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.

artdesign

Kpi Dashboard Design

Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.

designdata

Dbt Transformation Patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

testingdocumenttool

Sql Optimization Patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

designdata

Anndata

This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.

arttooldata

Skill Information

Category:Creative
Last Updated:12/24/2025