import type { InfiniteQueryObserverBaseResult, InfiniteData } from '@tanstack/react-query'; import type { UseInfiniteGetListOptions } from '../../dataProvider'; import type { ListControllerResult } from './useListController'; import type { RaRecord, SortPayload, FilterPayload, Exporter, GetInfiniteListResult } from '../../types'; /** * Prepare data for the InfiniteList view * * @param {Object} props The props passed to the InfiniteList component. * * @return {Object} controllerProps Fetched and computed data for the List view * * @example * * import { useInfiniteListController } from 'react-admin'; * import ListView from './ListView'; * * const MyList = props => { * const controllerProps = useInfiniteListController(props); * return ; * } */ export declare const useInfiniteListController: (props?: InfiniteListControllerProps) => InfiniteListControllerResult; export interface InfiniteListControllerProps { debounce?: number; disableAuthentication?: boolean; /** * Whether to disable the synchronization of the list parameters with the current location (URL search parameters) */ disableSyncWithLocation?: boolean; exporter?: Exporter | false; filter?: FilterPayload; filterDefaultValues?: object; perPage?: number; queryOptions?: UseInfiniteGetListOptions; resource?: string; sort?: SortPayload; storeKey?: string | false; } export type InfiniteListControllerResult = ListControllerResult & { fetchNextPage: InfiniteQueryObserverBaseResult>, ErrorType>['fetchNextPage']; fetchPreviousPage: InfiniteQueryObserverBaseResult>, ErrorType>['fetchPreviousPage']; isFetchingNextPage: InfiniteQueryObserverBaseResult>, ErrorType>['isFetchingNextPage']; isFetchingPreviousPage: InfiniteQueryObserverBaseResult>, ErrorType>['isFetchingPreviousPage']; }; //# sourceMappingURL=useInfiniteListController.d.ts.map