diff --git a/apps/web/process/insurance/reactions.ts b/apps/web/process/insurance/reactions.ts index a95f24d..2750ee0 100644 --- a/apps/web/process/insurance/reactions.ts +++ b/apps/web/process/insurance/reactions.ts @@ -115,7 +115,7 @@ export function common({ store, apolloClient }: ProcessContext) { } ); - reaction( + debouncedReaction( () => $calculation.$values.getValues(['leasingPeriod', 'leasingWithoutKasko']), async ({ leasingPeriod, leasingWithoutKasko }) => { const { @@ -170,11 +170,13 @@ export function common({ store, apolloClient }: ProcessContext) { } }, { + delay: 1, fireImmediately: true, + wait: 100, } ); - reaction( + debouncedReaction( () => $calculation.$values.getValues(['leaseObjectCategory', 'leasingWithoutKasko']), async ({ leaseObjectCategory, leasingWithoutKasko }) => { const { @@ -222,6 +224,10 @@ export function common({ store, apolloClient }: ProcessContext) { .setOptions(normalizeOptions(defaultOsagoOptions)); } } + }, + { + delay: 1, + wait: 100, } );