From 088f6f06ba4b351a89e602a49c544682084d8ff3 Mon Sep 17 00:00:00 2001 From: Chika Date: Sun, 4 Apr 2021 20:58:21 +0300 Subject: [PATCH] pass debounced value to validation hook --- src/client/hocs/Calculation/withValue.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/hocs/Calculation/withValue.jsx b/src/client/hocs/Calculation/withValue.jsx index 923e461..801030b 100644 --- a/src/client/hocs/Calculation/withValue.jsx +++ b/src/client/hocs/Calculation/withValue.jsx @@ -7,13 +7,13 @@ import React from 'react'; export default Component => ({ name, valueName, validation, ...props }) => observer(() => { - const { value, setCurrentValue, debouncedValue } = useStoreValue({ + const { value, setCurrentValue } = useStoreValue({ valueName, }); const { status } = useStatus(name); const { validateStatus, message } = useValidation({ elementName: name, - value: debouncedValue, + value, validation, }); const { options } = useOptions(name);