diff --git a/components/lib/multiselect/MultiSelect.js b/components/lib/multiselect/MultiSelect.js index 21e4241d67..cd65311b3a 100644 --- a/components/lib/multiselect/MultiSelect.js +++ b/components/lib/multiselect/MultiSelect.js @@ -887,21 +887,19 @@ export const MultiSelect = React.memo( }; const getLabel = () => { - let label; - - if (!empty && !props.fixedPlaceholder) { - if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && props.value?.length > props.maxSelectedLabels) { - return getSelectedItemsLabel(); - } + if (empty || props.fixedPlaceholder) { + return ''; + } - if (ObjectUtils.isArray(props.value)) { - return props.value.reduce((acc, value, index) => acc + (index !== 0 ? ', ' : '') + getLabelByValue(value), ''); - } + if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && props.value?.length > props.maxSelectedLabels) { + return getSelectedItemsLabel(); + } - return ''; + if (ObjectUtils.isArray(props.value)) { + return props.value.reduce((acc, value, index) => acc + (index !== 0 ? ', ' : '') + getLabelByValue(value), ''); } - return label; + return ''; }; const getLabelContent = () => {