From efc422609a56819ee3705d20d38d2f9c4fa77b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 21 Apr 2022 13:22:02 +0200 Subject: [PATCH] N'enregistre pas les string vide dans useSelection --- site/source/components/conversation/ChoicesInput.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/source/components/conversation/ChoicesInput.tsx b/site/source/components/conversation/ChoicesInput.tsx index 80944e971..2170569b6 100644 --- a/site/source/components/conversation/ChoicesInput.tsx +++ b/site/source/components/conversation/ChoicesInput.tsx @@ -256,6 +256,9 @@ export function useSelection({ const handleChange = useCallback( (val: Key) => { val = val.toString() + if (!val.length) { + return + } setCurrentSelection(val) debounce.current != null && clearTimeout(debounce.current)