/* eslint-disable @typescript-eslint/no-explicit-any */ import type { ChoicesProps } from 'react-admin'; import { ReferenceInput, SelectInput } from 'react-admin'; import { connectField } from 'uniforms'; import React from 'react'; type InputProps = { allowEmpty?: boolean; className?: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any filterToQuery?: (filter: string) => any; label?: string | boolean | null; perPage?: number; reference: string; name: string; }; type Props = InputProps & Pick; /** * RaSelectReferenceInputField can be used in an autoform to */ const RaSelectReferenceInputField: React.FC> = connectField( ({ allowEmpty = true, value = null as any, onChange, optionText, optionValue, label, ...props }: Props & { value: string; onChange: (s: string) => void }) => { return ( { onChange(e.target.value); }, } as any } source={null as any} > ); } ); export default RaSelectReferenceInputField;