antd-crud-table API
    Preparing search index...

    Interface CrudDataSource<T, K>

    The interface every strategy implements: static fixtures, REST, localStorage, or a consumer's own.

    Implementations own their storage and lifetime. They are plain objects - no React involvement - so each is unit-testable without a renderer.

    interface CrudDataSource<T, K extends keyof T> {
        create(draft: CrudDraft<T>): Promise<T>;
        createMany?(drafts: readonly Partial<T>[]): Promise<readonly T[]>;
        list(query: CrudQuery<T>): Promise<CrudPage<T>>;
        listAll?(
            query: Omit<CrudQuery<T>, "page" | "pageSize">,
        ): Promise<readonly T[]>;
        remove(id: T[K]): Promise<void>;
        update(id: T[K], draft: CrudDraft<T>): Promise<T>;
    }

    Type Parameters

    • T
    • K extends keyof T

    Implemented by

    Index
    • Persist many new records in one call, returning them as stored.

      Exists so bulk import can avoid firing one request per row against sources that can create server-side in a batch. Optional: callers must fall back to repeated create (with bounded concurrency) when a source does not offer it.

      Parameters

      • drafts: readonly Partial<T>[]

      Returns Promise<readonly T[]>

    • Every record matching the query, ignoring pagination.

      Exists so export can cover the whole result set rather than the current page. Optional: a source over an unbounded remote collection may have no safe way to honour it, and callers must degrade to list when absent.

      Parameters

      Returns Promise<readonly T[]>

    • Delete the record at id.

      Parameters

      Returns Promise<void>