From 058419496df57c814a508a255288601c9cafd7c9 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Thu, 6 Apr 2023 15:51:48 +0300 Subject: [PATCH] fix: disable resetValue selectSeasonType selectHighSeasonStart on load-kp --- apps/web/process/payments/reactions/common.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/web/process/payments/reactions/common.ts b/apps/web/process/payments/reactions/common.ts index d58a3bf..310cd4b 100644 --- a/apps/web/process/payments/reactions/common.ts +++ b/apps/web/process/payments/reactions/common.ts @@ -532,11 +532,15 @@ export default function reactions({ store }: ProcessContext) { () => $process.has('LoadKP') ); - reaction( - () => $calculation.element('radioGraphType').getValue(), - () => { - $calculation.element('selectSeasonType').resetValue(); - $calculation.element('selectHighSeasonStart').resetValue(); - } + makeDisposable( + () => + reaction( + () => $calculation.element('radioGraphType').getValue(), + () => { + $calculation.element('selectSeasonType').resetValue(); + $calculation.element('selectHighSeasonStart').resetValue(); + } + ), + () => $process.has('LoadKP') ); }