From 93e0209697075ea4039839da9354e74bbafc6cba Mon Sep 17 00:00:00 2001 From: drimpact Date: Thu, 26 Oct 2023 05:18:19 +0100 Subject: [PATCH] #849 avoid initial query before questionnaire is selected --- src/app/components/TagInput/required.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/components/TagInput/required.tsx b/src/app/components/TagInput/required.tsx index ae816f66..2de69544 100644 --- a/src/app/components/TagInput/required.tsx +++ b/src/app/components/TagInput/required.tsx @@ -122,9 +122,13 @@ const RTISequenceInner = ( }; const RTISequence = getSequence((p: IExtProps) => p.qishID)(RTISequenceInner); -export const RequiredTagInput = (p: IExtProps): JSX.Element => - p.qishType === QuestionnairishType.QUESTIONNAIRE ? ( +export const RequiredTagInput = (p: IExtProps): JSX.Element => { + if (!p.qishID) { + return
; + } + return p.qishType === QuestionnairishType.QUESTIONNAIRE ? ( ) : ( ); +};