Merge pull request #5914 from Digipex/fix/issue-5330

fix: TreeNode selectable not being used when in checkbox selectionMode
pull/6163/head
Tuğçe Küçükoğlu 2024-08-01 14:11:53 +03:00 committed by GitHub
commit 2fa7e77121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -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) {