Skip to content

Commit

Permalink
[@mantine/form] Fix error not clearing when field value changes after…
Browse files Browse the repository at this point in the history
… validation with schema
  • Loading branch information
rtivital committed Jun 5, 2022
1 parent a213525 commit bd7301b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mantine-form/src/use-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function useForm<T extends { [key: string]: any }>({
errorPath?: string
) => {
setValues((currentValues) => ({ ...currentValues, [field]: value }));
clearFieldError(errorPath);
clearFieldError(errorPath || field);
};

const setListItem = <K extends keyof T, V extends T[K]>(
Expand Down

0 comments on commit bd7301b

Please sign in to comment.