Skip to content

Commit

Permalink
#849 avoid initial query before questionnaire is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
drimpact committed Oct 26, 2023
1 parent daeadc5 commit 93e0209
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/components/TagInput/required.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div />;
}
return p.qishType === QuestionnairishType.QUESTIONNAIRE ? (
<RTIQuestionnaire {...p} />
) : (
<RTISequence {...p} />
);
};

0 comments on commit 93e0209

Please sign in to comment.