Skip to content

Commit 96288cc

Browse files
authored
Merge pull request #53 from workfloworchestrator/1719-revalidate-api-if-stale
1719 revalidate api if stale
2 parents d4c2b1c + d2f0839 commit 96288cc

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
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+
Disables using previous form definition while new one is loading

frontend/packages/pydantic-forms/src/core/hooks/useApiProvider.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export function useApiProvider(
7575
revalidateIfStale: true,
7676
revalidateOnReconnect: false,
7777
revalidateOnFocus: false,
78-
keepPreviousData: true,
78+
// We want to make sure the correct data is showing so we don't want to prefill with stale data
79+
// we dont use the previous data because of that
80+
keepPreviousData: false,
7981
shouldRetryOnError: false,
8082

8183
...swrConfig,

0 commit comments

Comments
 (0)