fix: tree-select selectable not work, close #4838
parent
6f0dab1f72
commit
35bcec1e80
|
@ -64,7 +64,7 @@ function formatTreeData(
|
|||
|
||||
function dig(dataNodes: DataNode[]) {
|
||||
return (dataNodes || []).map(node => {
|
||||
const { key, disableCheckbox, disabled } = node;
|
||||
const { key, disableCheckbox, disabled, selectable } = node;
|
||||
|
||||
const value = node[fieldValue];
|
||||
const mergedValue = fieldValue in node ? value : key;
|
||||
|
@ -76,6 +76,7 @@ function formatTreeData(
|
|||
value: mergedValue,
|
||||
title: getLabelProp(node),
|
||||
node,
|
||||
selectable,
|
||||
dataRef: node,
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ export interface DataNode {
|
|||
disableCheckbox?: boolean;
|
||||
checkable?: boolean;
|
||||
children?: DataNode[];
|
||||
selectable?: boolean;
|
||||
|
||||
/** Customize data info */
|
||||
[prop: string]: any;
|
||||
|
@ -32,8 +33,9 @@ export interface InternalDataEntity {
|
|||
key: Key;
|
||||
value: RawValueType;
|
||||
title?: any;
|
||||
disableCheckbox?: boolean;
|
||||
disabled?: boolean;
|
||||
disableCheckbox: boolean;
|
||||
disabled: boolean;
|
||||
selectable: boolean;
|
||||
children?: InternalDataEntity[];
|
||||
|
||||
/** Origin DataNode */
|
||||
|
|
Loading…
Reference in New Issue