Skip to content

Commit 84164b9

Browse files
author
zehui.zhang
committed
fix: [Tree] renderItem
1 parent ef75bd2 commit 84164b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/tree/node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Node extends Component {
268268
supportCheckbox={supportCheckbox}
269269
supportTooltip={supportTooltip}
270270
onDoubleClick={() => onDoubleClick(data)}
271-
renderItem={renderItem ? tmp => renderItem(tmp, data) : null}
271+
renderItem={tmp => renderItem?.(data, tmp)}
272272
/>
273273
{/* 点击菜单 */}
274274
{supportMenu && menuType !== RIGHT_MENU && !disabled && (
@@ -489,7 +489,7 @@ function ShowSelection({
489489
}
490490
}
491491

492-
tmp = renderItem ? renderItem(tmp) : tmp;
492+
tmp = renderItem?.(tmp) || tmp;
493493

494494
const labelWidth = {
495495
width:

0 commit comments

Comments
 (0)