From d208fb6f82db58fb0b335101fea28c852a354671 Mon Sep 17 00:00:00 2001 From: samuelmale Date: Mon, 27 Jan 2025 14:30:42 +0300 Subject: [PATCH] Fix tooltips for multi-select fields that are not required --- .../inputs/multi-select/multi-select.component.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/inputs/multi-select/multi-select.component.tsx b/src/components/inputs/multi-select/multi-select.component.tsx index 4a54dc9d..afddee19 100644 --- a/src/components/inputs/multi-select/multi-select.component.tsx +++ b/src/components/inputs/multi-select/multi-select.component.tsx @@ -77,10 +77,6 @@ const MultiSelect: React.FC = ({ field, value, errors, warn return false; }, [sessionMode, field.readonly, field.inlineRendering, layoutType, workspaceLayout]); - const label = useMemo(() => { - return field.isRequired ? : {t(field.label)}; - }, [field.isRequired, field.label, t]); - return sessionMode == 'view' || sessionMode == 'embedded-view' ? (
= ({ field, value, errors, warn items={selectOptions} initialSelectedItems={initiallySelectedQuestionItems} label={''} - titleText={label} + titleText={} itemToString={(item) => (item ? item.label : ' ')} disabled={field.isDisabled} invalid={errors.length > 0} @@ -114,7 +110,10 @@ const MultiSelect: React.FC = ({ field, value, errors, warn readOnly={isTrue(field.readonly)} /> ) : ( - + } + readOnly={isTrue(field.readonly)}> {field.questionOptions.answers?.map((value, index) => { return (