UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

41 lines 1.4 kB
import { ReactNode } from 'react'; import { InfiniteListControllerProps } from './useInfiniteListController'; import { RaRecord } from '../../types'; /** * Call useInfiniteListController and put the value in a ListContext * * Base class for <InfiniteList> components, without UI. * * Accepts any props accepted by useInfiniteListController: * - filter: permanent filter applied to the list * - filters: Filter element, to display the filters * - filterDefaultValues: object; * - perPage: Number of results per page * - sort: Default sort * - exporter: exported function * * @example // Custom list layout * * const PostList = () => ( * <InfiniteListBase perPage={10}> * <div> * List metrics... * </div> * <Grid container> * <Grid item xs={8}> * <SimpleList primaryText={record => record.title} /> * </Grid> * <Grid item xs={4}> * List instructions... * </Grid> * </Grid> * <div> * Post related links... * </div> * </ListBase> * ); */ export declare const InfiniteListBase: <RecordType extends RaRecord<import("../../types").Identifier> = any>({ children, ...props }: InfiniteListControllerProps<RecordType> & { children: ReactNode; }) => JSX.Element; //# sourceMappingURL=InfiniteListBase.d.ts.map