From ef17634e4881ace519fbc2935f78db9e2865a9d2 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Mon, 9 Nov 2020 16:23:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8E=20Diminue=20le=20debounce=20suite?= =?UTF-8?q?=20au=20cache=20de=20l'applicabilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il avait augmenté dans 9f119b4 --- .../cypress/integration/mon-entreprise/simulateurs.js | 1 + mon-entreprise/source/components/TargetSelection.tsx | 2 +- mon-entreprise/source/components/conversation/Input.tsx | 2 +- mon-entreprise/source/components/conversation/RuleInput.tsx | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js b/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js index d52a0dcf2..6253fef35 100644 --- a/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js +++ b/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js @@ -62,6 +62,7 @@ describe('Simulateurs', function() { .invoke('val') .should('be', '500') } + cy.contains('€/an').click() }) it('should allow to navigate to a documentation page', function() { diff --git a/mon-entreprise/source/components/TargetSelection.tsx b/mon-entreprise/source/components/TargetSelection.tsx index ec6de2a3d..e8c7cb4f0 100644 --- a/mon-entreprise/source/components/TargetSelection.tsx +++ b/mon-entreprise/source/components/TargetSelection.tsx @@ -225,7 +225,7 @@ function TargetInputOrValue({ color: colors.textColor, borderColor: colors.textColor }} - debounce={1000} + debounce={750} name={target.dottedName} value={value} className={ diff --git a/mon-entreprise/source/components/conversation/Input.tsx b/mon-entreprise/source/components/conversation/Input.tsx index 7c7dba5dd..f1c91bbe9 100644 --- a/mon-entreprise/source/components/conversation/Input.tsx +++ b/mon-entreprise/source/components/conversation/Input.tsx @@ -17,7 +17,7 @@ export default function Input({ autoFocus, unit }) { - const debouncedOnChange = useCallback(debounce(750, onChange), []) + const debouncedOnChange = useCallback(debounce(550, onChange), []) const { language } = useTranslation().i18n const { thousandSeparator, decimalSeparator } = currencyFormat(language) diff --git a/mon-entreprise/source/components/conversation/RuleInput.tsx b/mon-entreprise/source/components/conversation/RuleInput.tsx index 2b3fa20aa..84feb3c8d 100644 --- a/mon-entreprise/source/components/conversation/RuleInput.tsx +++ b/mon-entreprise/source/components/conversation/RuleInput.tsx @@ -124,7 +124,7 @@ export default function RuleInput({