Skip to content

Commit

Permalink
fix: [tree] 修复多选时节点禁用不显示选中状态 fix #1023
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfeng_wang authored and albyben committed Dec 19, 2024
1 parent d9cd55e commit 914fbeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions components/tree/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
&-selected {
.node-selected();
}

.@{kd-prefix}-checkbox-default-disabled {
.@{kd-prefix}-checkbox-default-indeterminate::before {
background-color: @tree-node-disabled-color;
}
}
}
&-title {
white-space: nowrap;
Expand Down
4 changes: 2 additions & 2 deletions components/tree/treeNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ const TreeNode = React.forwardRef<unknown, TreeNodeProps>((props) => {
{checkable ? (
<Checkbox
onChange={handleOnchange}
checked={!disabled && checked}
indeterminate={!disabled && indeterminate}
checked={checked}
indeterminate={indeterminate}
disabled={disabled}
onClick={(e: React.MouseEvent) => e.stopPropagation()}
>
Expand Down

0 comments on commit 914fbeb

Please sign in to comment.