diff --git a/src/Components/Inputs/Search/index.jsx b/src/Components/Inputs/Search/index.jsx index 647af874a..a3b75161c 100644 --- a/src/Components/Inputs/Search/index.jsx +++ b/src/Components/Inputs/Search/index.jsx @@ -154,6 +154,7 @@ const Search = ({ }} renderOption={(props, option) => { const { key, ...optionProps } = props; + const hasSecondaryLabel = secondaryLabel && option[secondaryLabel] !== undefined; return ( - {option[filteredBy] + (secondaryLabel ? ` (${option[secondaryLabel]})` : "")} + {option[filteredBy] + + (hasSecondaryLabel ? ` (${option[secondaryLabel]})` : "")} ); }}