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

    Interface CrudTableActions<T, K>

    What useCrudTable returns.

    interface CrudTableActions<T, K extends keyof T> {
        actionRef: RefObject<ActionType | undefined>;
        create: (draft: CrudDraft<T>) => Promise<T | null>;
        dataSource: CrudDataSource<T, K>;
        refresh: () => Promise<void>;
        remove: (id: T[K]) => Promise<boolean>;
        setPage: (page: number) => void;
        setPageSize: (size: number) => void;
        state: CrudTableState<T>;
        update: (id: T[K], draft: CrudDraft<T>) => Promise<T | null>;
    }

    Type Parameters

    • T
    • K extends keyof T
    Index
    actionRef: RefObject<ActionType | undefined>

    ProTable's imperative handle, for reloading the table's own pipeline.

    create: (draft: CrudDraft<T>) => Promise<T | null>

    Create a record. Resolves to the stored result, or null on failure.

    dataSource: CrudDataSource<T, K>

    The live source, for wiring a table's own request pipeline directly.

    refresh: () => Promise<void>

    Re-read the current page into state.

    remove: (id: T[K]) => Promise<boolean>

    Delete a record. Resolves to whether it succeeded.

    setPage: (page: number) => void

    Move to a 1-based page.

    setPageSize: (size: number) => void

    Change the page size, returning to the first page.

    Current loading, error, data and pagination state.

    update: (id: T[K], draft: CrudDraft<T>) => Promise<T | null>

    Update a record. Resolves to the stored result, or null on failure.