Skip to content

Commit

Permalink
AutoComplete: Use ObjectUtils helper class to check suggestion is obj…
Browse files Browse the repository at this point in the history
…ect or not.
  • Loading branch information
CodeElixir committed Apr 10, 2024
1 parent d1b771c commit 9247a36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/autocomplete/AutoCompletePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const AutoCompletePanel = React.memo(
);
}

const key = `${index}_${typeof suggestion === 'object' ? getOptionRenderKey(suggestion) : suggestion}`;
const key = `${index}_${ObjectUtils.isObject(suggestion) ? getOptionRenderKey(suggestion) : suggestion}`;
const itemProps = mergeProps(
{
style,
Expand All @@ -168,7 +168,7 @@ export const AutoCompletePanel = React.memo(
const flattenGroupedItems = (items) => {
try {
return items?.map((item) => [item?.[props?.optionGroupLabel], ...item?.[props?.optionGroupChildren]]).flat();
} catch (e) {}
} catch (e) { }
};

const createContent = () => {
Expand Down

0 comments on commit 9247a36

Please sign in to comment.