Skip to content

Commit

Permalink
fix: [tree] 修复设置树节点样式与类名不生效问题 fix kingdee#930
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfeng_wang authored and hxh2010 committed Dec 6, 2024
1 parent fe013e3 commit da0baff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/tree/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ const InternalTree = React.forwardRef((props: TreeProps, ref: any): React.Functi
onDrop,
onSelect,
selectedKeys: selectedKeysProps,
setTreeNodeStyle = () => ({}),
setTreeNodeClassName = () => '',
setTreeNodeStyle,
setTreeNodeClassName,
estimatedItemSize: innerEstimatedItemSize,
style,
className,
Expand Down Expand Up @@ -495,8 +495,8 @@ const InternalTree = React.forwardRef((props: TreeProps, ref: any): React.Functi
item.switcherIcon = item.switcherIcon || switcherIcon
item.estimatedItemSize = estimatedItemSize
item.draggable = draggable
item.className = setTreeNodeClassName(Object.assign({}, item))
item.style = setTreeNodeStyle(Object.assign({}, item))
item.className = setTreeNodeClassName?.(Object.assign({}, item)) || item?.className
item.style = setTreeNodeStyle?.(Object.assign({}, item)) || item?.style
item.getDragNode = getDragNode
item.setDragNode = setDragNode
item.dragOver = dragOverNodeKey === item.key && dropPosition === 0
Expand Down

0 comments on commit da0baff

Please sign in to comment.