Hosanna UI API v2.3.0-next
    Preparing search index...

    Interface for a data source configuration in a collection view row. Replaces the flat remoteItemsUrl/loadMoreUrl fields with a structured object.

    interface IDataSourceConfig {
        body?: any;
        contextData?: JsonData;
        headers?: Record<string, string>;
        loadingStrategy?: CollectionViewDataSourceLoadingStrategy;
        loadMoreUrl?: string;
        method?: string;
        postProcessFunction?: (response: IHsFetchResponse) => void;
        type: CollectionViewDataSourceType;
        url?: string;
    }
    Index

    Properties

    body?: any

    Request body (for POST/PUT requests).

    contextData?: JsonData

    Context data passed to the post-process function as response.contextData (e.g. row id, request key).

    headers?: Record<string, string>

    HTTP headers as key-value pairs.

    Loading strategy: eager (load immediately) or lazy (wait until visible).

    loadMoreUrl?: string

    URL for pagination/loading more items (replaces loadMoreUrl).

    method?: string

    HTTP method (default: 'GET').

    postProcessFunction?: (response: IHsFetchResponse) => void

    Post-process function to apply to the data.

    Type of data source: static (inline items) or dynamic (remote).

    url?: string

    URL for fetching items (replaces remoteItemsUrl).