fix: TreeNode selectable not being used when in checkbox selectionMode
If node selectable is false then clicking the node shouldn't add the node to selectedKeys. added selectable != false because selectable can be null | undefined | true to show the checkbox.pull/5914/head
parent
53e6246625
commit
9fca0078c4
|
@ -142,7 +142,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isCheckboxSelectionMode()) {
|
if (this.isCheckboxSelectionMode()) {
|
||||||
|
if (this.node.selectable != false) {
|
||||||
this.toggleCheckbox();
|
this.toggleCheckbox();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$emit('node-click', {
|
this.$emit('node-click', {
|
||||||
originalEvent: event,
|
originalEvent: event,
|
||||||
|
@ -336,7 +338,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
propagateDown(node, check, selectionKeys) {
|
propagateDown(node, check, selectionKeys) {
|
||||||
if (check) selectionKeys[node.key] = { checked: true, partialChecked: false };
|
if (check && node.selectable != false) selectionKeys[node.key] = { checked: true, partialChecked: false };
|
||||||
else delete selectionKeys[node.key];
|
else delete selectionKeys[node.key];
|
||||||
|
|
||||||
if (node.children && node.children.length) {
|
if (node.children && node.children.length) {
|
||||||
|
|
Loading…
Reference in New Issue