Skip to content

Commit 2aba66e

Browse files
author
Ruben van Leeuwen
committed
2134: Fixes resseting errorDetails in the correct spot
1 parent c9725c8 commit 2aba66e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ function PydanticFormContextProvider({
199199

200200
const submitFormFn = useCallback(() => {
201201
setIsSending(true);
202+
setErrorDetails(undefined);
202203
addFormInputData();
203204
window.scrollTo(0, 0);
204205
}, []);
@@ -343,7 +344,6 @@ function PydanticFormContextProvider({
343344

344345
if (apiResponse?.form && rawSchema !== apiResponse.form) {
345346
setRawSchema(apiResponse.form);
346-
setErrorDetails(undefined);
347347
if (apiResponse.meta) {
348348
setHasNext(!!apiResponse.meta.hasNext);
349349
}

0 commit comments

Comments
 (0)