Skip to content

Commit

Permalink
fix: treeCheckable should support ReactNode
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Sep 27, 2019
1 parent 72ec97f commit 90dd558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IconType } from 'rc-tree/lib/interface';
import { Key, LegacyDataNode } from './interface';

interface ContextProps {
checkable: boolean;
checkable: boolean | React.ReactNode;
checkedKeys: Key[];
halfCheckedKeys: Key[];
treeExpandedKeys: Key[];
Expand Down
2 changes: 1 addition & 1 deletion src/TreeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const RefTreeSelect = React.forwardRef<RefSelectProps, TreeSelectProps>((props,
onSelect,
onDeselect,
} = props;
const mergedCheckable = !!(treeCheckable || treeCheckStrictly);
const mergedCheckable: React.ReactNode | boolean = treeCheckable || treeCheckStrictly;
const mergedMultiple = multiple || mergedCheckable;
const treeConduction = treeCheckable && !treeCheckStrictly;
const mergedLabelInValue = treeCheckStrictly || labelInValue;
Expand Down

0 comments on commit 90dd558

Please sign in to comment.