From 18338a9afd94fdb9a0adfb9e7e811f975651dd64 Mon Sep 17 00:00:00 2001 From: ialakey Date: Mon, 1 Jul 2024 19:03:15 +0200 Subject: [PATCH] #69 Restore functionality of the SDC-IDE fix reference --- .../components/reference/hooks.ts | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/web/src/components/QRFormWrapper/components/reference/hooks.ts b/web/src/components/QRFormWrapper/components/reference/hooks.ts index 08432701..89e546de 100644 --- a/web/src/components/QRFormWrapper/components/reference/hooks.ts +++ b/web/src/components/QRFormWrapper/components/reference/hooks.ts @@ -1,15 +1,13 @@ -import { useFieldController } from '@beda.software/fhir-questionnaire/components/QuestionnaireResponseForm'; import { parseFhirQueryExpression, QuestionItemProps, } from '@beda.software/fhir-questionnaire/vendor/sdc-qrf'; +import { ResourcesMap } from '@beda.software/fhir-react'; +import { isSuccess, buildQueryParams } from '@beda.software/remote-data'; import fhirpath from 'fhirpath'; import { ActionMeta, MultiValue, SingleValue } from 'react-select'; import { loadResourceOptions } from 'web/src/services/questionnaire'; -import { isSuccess, buildQueryParams } from '@beda.software/remote-data'; -import { ResourcesMap } from '@beda.software/fhir-react'; - import { QuestionnaireItemAnswerOption, QuestionnaireResponseItemAnswer, @@ -40,8 +38,6 @@ export function useAnswerReference | MultiValue, action: ActionMeta, ) => { if (!repeats || action.action !== 'select-option') { - if (Array.isArray(selectedValue)) { - onChange(selectedValue as MultiValue); - } else { - onChange(selectedValue as SingleValue); - } + return; } }; @@ -101,7 +93,7 @@ export function useAnswerReference