Skip to content

Commit

Permalink
fix: [TreeSelect] Fix the problem of TypeError caused by data structu…
Browse files Browse the repository at this point in the history
…re error in TreeSelect (#1873)
  • Loading branch information
YyumeiZhang authored Oct 26, 2023
1 parent 3cb7736 commit 5ba19cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/semi-ui/treeSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState> {
};
const { content, isRenderInTag } = (item && treeNodeLabelProp in item) ?
(renderSelectedItem as RenderSelectedItemInMultiple)(item, { index, onClose }) :
null;
({} as any);
if (isNull(content) || isUndefined(content)) {
return;
}
Expand Down Expand Up @@ -1109,7 +1109,7 @@ class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState> {
if (isFunction(renderSelectedItem)) {
const { content, isRenderInTag } = item && treeNodeLabelProp in item ?
(renderSelectedItem as RenderSelectedItemInMultiple)(item, { index: idx, onClose }) :
null;
({} as any);
if (isRenderInTag) {
return <Tag {...tagProps}>{content}</Tag>;
} else {
Expand Down

0 comments on commit 5ba19cb

Please sign in to comment.