File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
packages/pydantic-forms/src Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' pydantic-forms ' : patch
3+ ---
4+
5+ Refetches form definiton everytime the form is loaded
Original file line number Diff line number Diff line change @@ -88,13 +88,6 @@ function PydanticFormContextProvider({
8888 cancelButton,
8989 } = config ;
9090
91- // TODO: Fix this again
92- // option to enable the debug mode on the fly in the browser
93- // by setting localStorage.setItem("pydanticFormsDebugMode", "true")
94- // reload is required
95- const debugMode = false ;
96-
97- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9891 const [ formInputData , setFormInputData ] = useState < object [ ] > ( [ ] ) ;
9992
10093 const addFormInputData = ( formInput : object ) => {
@@ -336,7 +329,6 @@ function PydanticFormContextProvider({
336329 onCancel,
337330 title,
338331 sendLabel,
339- debugMode,
340332 isFullFilled,
341333 customDataProvider,
342334 errorDetails,
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ export function useApiProvider(
7171 {
7272 fallback : { } ,
7373
74- // we dont want to refresh the form structure automatically
75- revalidateIfStale : false ,
74+ // We revalidate to make sure the form updates when we use it a second time
75+ revalidateIfStale : true ,
7676 revalidateOnReconnect : false ,
7777 revalidateOnFocus : false ,
7878 keepPreviousData : true ,
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ export interface PydanticFormContextProps {
5353 rhf : ReturnType < typeof useForm > ;
5454 errorDetails ?: PydanticFormValidationErrorDetails ;
5555 pydanticFormSchema ?: PydanticFormSchema ;
56- debugMode ?: boolean ;
5756 title ?: string | boolean ;
5857 sendLabel ?: string ;
5958 onCancel ?: ( ) => void ;
You can’t perform that action at this time.
0 commit comments