From 4768e0f5872b11847cd926d1f96de1e27aa4cf99 Mon Sep 17 00:00:00 2001 From: Henri Remonen Date: Thu, 4 May 2023 14:15:23 +0300 Subject: [PATCH] Fix bug where dimension completion would trigger as soon as a dimension is selected --- src/client/components/Openai/DimensionCompletion.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/components/Openai/DimensionCompletion.tsx b/src/client/components/Openai/DimensionCompletion.tsx index 25ae3bdd..ce1c90c1 100644 --- a/src/client/components/Openai/DimensionCompletion.tsx +++ b/src/client/components/Openai/DimensionCompletion.tsx @@ -101,7 +101,10 @@ const DimensionCompletion = ({ data-cy="dimension-completion-select" value={dimensionId} label={t('openai:dimensionSelect')} - onChange={({ target }) => setdimensionId(target.value)} + onChange={({ target }) => { + setdimensionId(target.value) + setShowCompletion(false) + }} > {dimensions.map((d) => (