Skip to content

Commit

Permalink
fix(#4424): disable checkbox for disabled node (#4425)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem authored Nov 15, 2024
1 parent d6131c1 commit a60c39f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<va-checkbox
:model-value="$props.node.checked"
:color="colorComputed"
:disabled="!!$props.node.disabled || $props.disabled"
indeterminate
@update:model-value="(v) => toggleCheckbox($props.node, v)"
class="va-tree-node__checkbox"
Expand All @@ -62,6 +63,7 @@
<va-tree-node
v-for="childNode in $props.node.children"
:key="getTrackBy(childNode)"
:disabled="$props.node.disabled"
:node="childNode"
>
<template v-for="(_, name) in $slots" :key="name" v-slot:[name]="slotScope: any">
Expand Down Expand Up @@ -95,6 +97,10 @@ const props = defineProps({
type: Object as PropType<TreeNode>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
})
const {
Expand Down

0 comments on commit a60c39f

Please sign in to comment.