Skip to content

Commit

Permalink
[TypeScript] Forbid <ReferenceInput validate>
Browse files Browse the repository at this point in the history
## Problem

Since #9637, using `<ReferenceInput validate>` fails at runtime. this is unexpected

## Solution

Fail at build time instead.

This may break existing apps, so I'm pulling against `next`.
  • Loading branch information
fzaninotto committed Feb 29, 2024
1 parent 47abf59 commit 29e43f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ra-ui-materialui/src/input/ReferenceInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,9 @@ export interface ReferenceInputProps
UseReferenceInputControllerParams {
children?: ReactElement;
label?: string;
/**
* Call validate on the child component instead
*/
validate?: never;
[key: string]: any;
}

0 comments on commit 29e43f0

Please sign in to comment.