import React from 'react'; import { ReferenceInputBaseProps } from 'ra-core'; /** * An Input component for choosing a reference record. Useful for foreign keys. * * This component fetches the possible values in the reference resource * (using `dataProvider.getList()`), then renders an ``, * to which it passes the possible choices via a `ChoicesContext`. * * You can pass a child select component to customize the way the reference * selector is displayed (e.g. using `` or `` * instead of ``). * * @example // default selector: AutocompleteInput * export const CommentEdit = () => ( * * * * * * ); * * @example // using a SelectInput as selector * export const CommentEdit = () => ( * * * * * * * * ); * * 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 * * * The enclosed component may filter results. ReferenceInput create a ChoicesContext which provides * a `setFilters` function. You can call this function to filter the results. */ export declare const ReferenceInput: (props: ReferenceInputProps) => React.JSX.Element; export interface ReferenceInputProps extends ReferenceInputBaseProps { /** * Call validate on the child component instead */ validate?: never; [key: string]: any; } //# sourceMappingURL=ReferenceInput.d.ts.map