The base data source API interface that is available in the grid [[apiRef]].

interface GridDataSourceApiBase {
    cache: GridDataSourceCache;
    fetchRows: ((parentId?: GridRowId) => void);
    setChildrenFetchError: ((parentId: GridRowId, error: null | Error) => void);
    setChildrenLoading: ((parentId: GridRowId, loading: boolean) => void);
}

Properties

The data source cache object.

fetchRows: ((parentId?: GridRowId) => void)

Fetches the rows from the server for a given parentId. If no parentId is provided, it fetches the root rows.

Type declaration

    • (parentId?): void
    • Parameters

      • OptionalparentId: GridRowId

        The id of the group to be fetched.

      Returns void

setChildrenFetchError: ((parentId: GridRowId, error: null | Error) => void)

Set error occured while fetching the children of a row.

Type declaration

    • (parentId, error): void
    • Parameters

      • parentId: GridRowId

        The id of the parent node.

      • error: null | Error

        The error of type Error or null.

      Returns void

setChildrenLoading: ((parentId: GridRowId, loading: boolean) => void)

Set the loading state of a parent row.

Type declaration

    • (parentId, loading): void
    • Parameters

      • parentId: GridRowId

        The id of the parent node.

      • loading: boolean

        The loading state to set.

      Returns void