import { Component, ReactNode } from 'react'; import { crudGetManyReference as crudGetManyReferenceAction } from '../../actions'; import { Record, Sort, RecordMap, Identifier, Dispatch } from '../../types'; interface ChildrenFuncParams { currentSort: Sort; data: RecordMap; ids: Identifier[]; loadedOnce: boolean; page: number; perPage: number; referenceBasePath: string; setPage: (page: number) => void; setPerPage: (perPage: number) => void; setSort: (field: string) => void; total: number; } interface Props { basePath: string; children: (params: ChildrenFuncParams) => ReactNode; crudGetManyReference: Dispatch; data?: RecordMap; filter?: any; ids?: any[]; loadedOnce?: boolean; perPage?: number; record?: Record; reference: string; resource: string; sort?: Sort; source: string; target: string; total?: number; } interface State { sort: Sort; page: number; perPage: number; } /** * Render related records to the current one. * * You must define the fields to be passed to the iterator component as children. * * @example Display all the comments of the current post as a datagrid * * * * * * * * * * @example Display all the books by the current author, only the title * * * * * * * By default, restricts the possible values to 25. You can extend this limit * by setting the `perPage` prop. * * @example * * ... * * * By default, orders the possible values by id desc. You can change this order * by setting the `sort` prop (an object with `field` and `order` properties). * * @example * * ... * * * Also, you can filter the query used to populate the possible values. Use the * `filter` prop for that. * * @example * * ... * */ export declare class UnconnectedReferenceManyFieldController extends Component { static defaultProps: Partial; state: State; componentDidMount(): void; componentWillReceiveProps(nextProps: Props): void; setSort: (field: string) => void; setPage: (page: number) => void; setPerPage: (perPage: number) => void; fetchReferences({ reference, record, resource, target, filter, source }?: Readonly<{ children?: ReactNode; }> & Readonly): void; render(): ReactNode; } declare const ReferenceManyFieldController: import("react-redux").ConnectedComponentClass; export default ReferenceManyFieldController;