Skip to content

Commit

Permalink
Merge branch 'main' into feat/added-migration-guide-to-use-list
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaevAlexandr authored Aug 1, 2024
2 parents 77ba528 + 0e22bde commit 35ef66e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/TreeSelect/TreeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ export const TreeSelect = React.forwardRef(function TreeSelect<T>(
<SelectControl
{...controlProps}
selectedOptionsContent={React.Children.toArray(
value.map(
(itemId) => mapItemDataToContentProps(list.structure.itemsById[itemId]).title,
value.map((itemId) =>
itemId in list.structure.itemsById
? mapItemDataToContentProps(list.structure.itemsById[itemId]).title
: '',
),
).join(', ')}
view="normal"
Expand Down

0 comments on commit 35ef66e

Please sign in to comment.