diff --git a/packages/ra-core/src/controller/input/useReferenceInputController.spec.tsx b/packages/ra-core/src/controller/input/useReferenceInputController.spec.tsx index 249ef374143..f77b6f11fd8 100644 --- a/packages/ra-core/src/controller/input/useReferenceInputController.spec.tsx +++ b/packages/ra-core/src/controller/input/useReferenceInputController.spec.tsx @@ -3,12 +3,20 @@ import { useState, useCallback, ReactElement } from 'react'; import { render, screen, fireEvent, waitFor } from '@testing-library/react'; import expect from 'expect'; -import { useReferenceInputController } from './useReferenceInputController'; +import { + useReferenceInputController, + UseReferenceInputControllerParams, +} from './useReferenceInputController'; import { CoreAdminContext } from '../../core'; -import { Form, useInput } from '../../form'; +import { ChoicesContextValue, Form, useInput } from '../../form'; import { testDataProvider } from '../../dataProvider'; +import { SortPayload } from '../../types'; -const ReferenceInputController = props => { +const ReferenceInputController = ( + props: UseReferenceInputControllerParams & { + children: (options: ChoicesContextValue) => React.ReactNode; + } +) => { const { children, ...rest } = props; const inputProps = useInput({ ...rest, @@ -160,7 +168,6 @@ describe('useReferenceInputController', () => {