diff --git a/packages/@mantine/form/src/hooks/use-form-status/use-form-status.ts b/packages/@mantine/form/src/hooks/use-form-status/use-form-status.ts index 88423549bd3..81c6c1d1d36 100644 --- a/packages/@mantine/form/src/hooks/use-form-status/use-form-status.ts +++ b/packages/@mantine/form/src/hooks/use-form-status/use-form-status.ts @@ -79,13 +79,13 @@ export function useFormStatus>({ const resetTouched: ResetStatus = useCallback(() => setTouched({}), []); - const resetDirty: ResetDirty = (values) => { + const resetDirty: ResetDirty = useCallback((values) => { const newSnapshot = values ? { ...values, ...$values.refValues.current } : $values.refValues.current; $values.setValuesSnapshot(newSnapshot); setDirty({}); - }; + }, []); const setFieldTouched: SetFieldTouched = useCallback((path, touched) => { setTouched((currentTouched) => {