pull/6161/head
tugcekucukoglu 2024-08-01 14:14:49 +03:00
parent 9608e30977
commit df7889447c
2 changed files with 5 additions and 3 deletions

View File

@ -143,7 +143,9 @@ export default {
} }
if (this.isCheckboxSelectionMode()) { if (this.isCheckboxSelectionMode()) {
this.toggleCheckbox(); if (this.node.selectable != false) {
this.toggleCheckbox();
}
} else { } else {
this.$emit('node-click', { this.$emit('node-click', {
originalEvent: event, originalEvent: event,
@ -337,7 +339,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) {

View File

@ -44,7 +44,7 @@ export interface TreeNode {
styleClass?: string; styleClass?: string;
/** /**
* Whether the node is selectable when selection mode is enabled. * Whether the node is selectable when selection mode is enabled.
* @defaultValue false * @defaultValue null
*/ */
selectable?: boolean; selectable?: boolean;
/** /**