fix(tree-select): checkable & selectable invalid (#4839)

Co-authored-by: tangjinzhou <415800467@qq.com>
pull/4752/head
zkwolf 2021-11-02 17:09:06 +08:00 committed by GitHub
parent c57da055fc
commit 247032833b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,7 @@ function formatTreeData(
function dig(dataNodes: DataNode[]) {
return (dataNodes || []).map(node => {
const { key, disableCheckbox, disabled, selectable } = node;
const { key, disableCheckbox, disabled, checkable, selectable } = node;
const value = node[fieldValue];
const mergedValue = fieldValue in node ? value : key;
@ -78,6 +78,8 @@ function formatTreeData(
node,
selectable,
dataRef: node,
checkable,
selectable,
};
if (node.slots) {

View File

@ -22,6 +22,7 @@ export interface DataNode {
disabled?: boolean;
disableCheckbox?: boolean;
checkable?: boolean;
selectable?: boolean;
children?: DataNode[];
selectable?: boolean;
@ -33,6 +34,7 @@ export interface InternalDataEntity {
key: Key;
value: RawValueType;
title?: any;
checkable: boolean;
disableCheckbox: boolean;
disabled: boolean;
selectable: boolean;