Skip to content

Commit b0f7857

Browse files
authored
Merge pull request #178 from workfloworchestrator/2143-reset-errors-formkey-change
2143 reset errors formkey change
2 parents f594e9b + 1bfc84a commit b0f7857

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'pydantic-forms': patch
3+
---
4+
5+
Resets errorDetails when switching forms

frontend/packages/pydantic-forms/src/core/PydanticFormContextProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ function PydanticFormContextProvider({
359359
if (formKey !== formRef.current) {
360360
setFormInputData([]);
361361
setFormInputHistory(new Map<string, object>());
362+
setErrorDetails(undefined);
362363
formRef.current = formKey;
363364
}
364365
}, [formKey]);

0 commit comments

Comments
 (0)