mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-25 11:19:16 -06:00
Merge pull request #1934 from Owaiseimdad/FIX-1913-Object-Existing-Check
Fixed the check for the label in options object in search component
This commit is contained in:
@@ -154,6 +154,7 @@ const Search = ({
|
||||
}}
|
||||
renderOption={(props, option) => {
|
||||
const { key, ...optionProps } = props;
|
||||
const hasSecondaryLabel = secondaryLabel && option[secondaryLabel] !== undefined;
|
||||
return (
|
||||
<ListItem
|
||||
key={key}
|
||||
@@ -167,7 +168,8 @@ const Search = ({
|
||||
: {}
|
||||
}
|
||||
>
|
||||
{option[filteredBy] + (secondaryLabel ? ` (${option[secondaryLabel]})` : "")}
|
||||
{option[filteredBy] +
|
||||
(hasSecondaryLabel ? ` (${option[secondaryLabel]})` : "")}
|
||||
</ListItem>
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user