Represents the properties for the CardView component.

interface ICardViewProps<
    ItemData extends ICardViewItemData = any,
    Payload extends any = any,
> {
    cardActions?: ICardViewAction<ItemData, Payload>[];
    fallback?: (e: Error) => void;
    formatCardLabel?: (item: ItemData) => ReactNode;
    formatKey?: (key: keyof ItemData) => ReactNode;
    formatMedia?: (item: ItemData) => ReactNode;
    formatValue?: (
        key: keyof ItemData,
        value: ItemData[keyof ItemData],
    ) => ReactNode;
    handler:
        | ItemData[]
        | (search: string, skip: number) => ItemData[] | Promise<ItemData[]>;
    noFooter?: boolean;
    noSearch?: boolean;
    onAction?: (action: string, item: ItemData) => void;
    onCardClick?: (item: ItemData) => void;
    onLoadEnd?: (isOk: boolean) => void;
    onLoadStart?: () => void;
    onOperation?: (
        operation: string,
        selectedItems: ItemData[],
        isAllSelected: boolean,
    ) => void | Promise<void>;
    operations?: ICardViewOperation<ItemData, Payload>[];
    payload?: Payload | () => Payload;
    pickFields?: (keyof ItemData)[];
    reloadSubject?: TSubject<void>;
    scrollXSubject?: TSubject<number>;
    scrollYSubject?: TSubject<number>;
    skipStep?: number;
    throwError?: boolean;
}

Type Parameters

  • ItemData extends ICardViewItemData = any

    The type of data for each item in the CardView.

  • Payload extends any = any

    The type of payload.

    ICardViewProps

Hierarchy (View Summary)

Properties

cardActions?: ICardViewAction<ItemData, Payload>[]
fallback?: (e: Error) => void
formatCardLabel?: (item: ItemData) => ReactNode
formatKey?: (key: keyof ItemData) => ReactNode
formatMedia?: (item: ItemData) => ReactNode
formatValue?: (
    key: keyof ItemData,
    value: ItemData[keyof ItemData],
) => ReactNode
handler:
    | ItemData[]
    | (search: string, skip: number) => ItemData[] | Promise<ItemData[]>
noFooter?: boolean
noSearch?: boolean
onAction?: (action: string, item: ItemData) => void
onCardClick?: (item: ItemData) => void
onLoadEnd?: (isOk: boolean) => void
onLoadStart?: () => void
onOperation?: (
    operation: string,
    selectedItems: ItemData[],
    isAllSelected: boolean,
) => void | Promise<void>
payload?: Payload | () => Payload
pickFields?: (keyof ItemData)[]
reloadSubject?: TSubject<void>
scrollXSubject?: TSubject<number>
scrollYSubject?: TSubject<number>
skipStep?: number
throwError?: boolean