Skip to content

Commit 791e742

Browse files
committed
Fix FilterLiveForm types for RHF 7.72.0
1 parent 8e62836 commit 791e742

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

packages/ra-core/src/form/FilterLiveForm.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import get from 'lodash/get.js';
55
import mergeWith from 'lodash/mergeWith.js';
66
import set from 'lodash/set.js';
77
import { ReactNode, useEffect } from 'react';
8-
import { FormProvider, useForm, UseFormProps } from 'react-hook-form';
8+
import {
9+
FieldValues,
10+
FormProvider,
11+
useForm,
12+
UseFormProps,
13+
} from 'react-hook-form';
914
import {
1015
SourceContextProvider,
1116
SourceContextValue,
@@ -155,9 +160,12 @@ const HTMLForm = (props: React.HTMLAttributes<HTMLFormElement>) => (
155160
);
156161

157162
export interface FilterLiveFormProps
158-
extends Omit<UseFormProps, 'onSubmit' | 'defaultValues'> {
163+
extends Omit<
164+
UseFormProps<FieldValues>,
165+
'onSubmit' | 'defaultValues' | 'validate'
166+
> {
159167
children: ReactNode;
160-
validate?: ValidateForm;
168+
validate?: ValidateForm<FieldValues>;
161169
debounce?: number | false;
162170
resource?: string;
163171
formComponent?: React.ComponentType<

0 commit comments

Comments
 (0)