Skip to content

Commit ef3a0f4

Browse files
committed
Forward other props supported by useForm
1 parent 64980a0 commit ef3a0f4

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

packages/ra-core/src/form/useAugmentedForm.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,16 @@ import { sanitizeEmptyValues as sanitizeValues } from './sanitizeEmptyValues';
3838
*/
3939
export const useAugmentedForm = (props: UseAugmentedFormProps) => {
4040
const {
41-
context,
4241
criteriaMode = 'firstError',
4342
defaultValues,
44-
delayError,
4543
formRootPathname,
46-
mode,
47-
resetOptions,
4844
resolver,
4945
reValidateMode = 'onChange',
5046
onSubmit,
5147
sanitizeEmptyValues,
52-
shouldFocusError,
53-
shouldUnregister,
54-
shouldUseNativeValidation,
5548
warnWhenUnsavedChanges,
5649
validate,
50+
...rest
5751
} = props;
5852
const record = useRecordContext(props);
5953
const saveContext = useSaveContext();
@@ -80,17 +74,11 @@ export const useAugmentedForm = (props: UseAugmentedFormProps) => {
8074
: undefined;
8175

8276
const form = useForm({
83-
context,
8477
criteriaMode,
8578
values: defaultValuesIncludingRecord,
86-
resetOptions,
87-
delayError,
88-
mode,
8979
reValidateMode,
9080
resolver: finalResolver,
91-
shouldFocusError,
92-
shouldUnregister,
93-
shouldUseNativeValidation,
81+
...rest,
9482
});
9583

9684
const formRef = useRef(form);

0 commit comments

Comments
 (0)