From aee6bcd264fd2a171fffb5e2107182f14380c4f0 Mon Sep 17 00:00:00 2001 From: samuelmale Date: Tue, 13 Aug 2024 10:24:00 +0300 Subject: [PATCH] Only highlight selected values for the compact multi-select --- .../multi-select/multi-select.component.tsx | 28 ++++++++++--------- translations/en.json | 23 ++++++--------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/src/components/inputs/multi-select/multi-select.component.tsx b/src/components/inputs/multi-select/multi-select.component.tsx index 8d2e62ae9..317fd0b45 100644 --- a/src/components/inputs/multi-select/multi-select.component.tsx +++ b/src/components/inputs/multi-select/multi-select.component.tsx @@ -130,19 +130,21 @@ const MultiSelect: React.FC = ({ field, value, errors, warn )} -
- {value?.length ? ( -
- {formFieldAdapters[field.type]?.getDisplayValue(field, value)?.map((displayValue, index) => ( - - {displayValue} - - ))} -
- ) : ( - - )} -
+ {!field.inlineMultiCheckbox && ( +
+ {value?.length ? ( +
+ {formFieldAdapters[field.type]?.getDisplayValue(field, value)?.map((displayValue, index) => ( + + {displayValue} + + ))} +
+ ) : ( + + )} +
+ )} ) ); diff --git a/translations/en.json b/translations/en.json index 11ba6b6ce..08c79dcc7 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2,22 +2,17 @@ "add": "Add", "addCameraImage": "Add camera image", "addFile": "Add files", - "attachmentsSaved": "Attachment(s) saved successfully", "cameraCapture": "Camera capture", "cancel": "Cancel", "chooseAnOption": "Choose an option", + "clearFile": "Clear file", "close": "Close", "closeCamera": "Close camera", "closesNotification": "Closes notification", - "submittedForm": "Form submitted", - "submittedFormDescription": "Form submitted successfully", - "errorDescription": "{{errors}}", - "errorDescriptionTitle": "Error on saving form", + "errorLoadingFormSchema": "Error loading form schema", + "errorLoadingInitialValues": "Error loading initial values", "errorRenderingField": "Error rendering field", - "errorSavingAttachments": "Error saving attachment(s)", - "errorSavingEncounter": "Error saving encounter", - "errorSavingPatientIdentifiers": "Error saving patient identifiers", - "errorSavingPatientPrograms": "Error saving patient program(s)", + "fieldErrorDescriptionTitle": "Validation Errors", "fileUploadDescription": "", "fileUploadDescriptionAny": "Upload any file type", "invalidWorkspaceName": "Invalid workspace name.", @@ -25,13 +20,12 @@ "launchWorkspace": "", "loading": "Loading", "notification": "Notification", - "ordersSaved": "Order(s) saved sucessfully", - "patientIdentifiersSaved": "Patient identifier(s) saved sucessfully", - "patientProgramsSaved": "Patient program(s) saved successfully", + "nullMandatoryField": "Please fill the required fields", "preview": "Preview", "previousValue": "Previous value:", "remove": "Remove", "required": "Required", + "reuseValue": "Reuse value", "revert": "Revert", "save": "Save", "search": "Search", @@ -39,9 +33,8 @@ "time": "Time", "unspecified": "Unspecified", "unspecifyAll": "Unspecify All", - "updatedRecord": "Record updated", - "updatedRecordDescription": "The patient encounter was updated", "upload": "Upload", "uploadedPhoto": "Uploaded photo", - "uploadImage": "Upload image" + "uploadImage": "Upload image", + "valuesOutOfBound": "Some of the values are out of bounds" }