Refactor #6435 - Tree

pull/6439/head
tugcekucukoglu 2024-09-19 10:58:26 +03:00
parent b8100f4c1b
commit 992b8d0018
2 changed files with 12 additions and 2 deletions

View File

@ -152,7 +152,7 @@ export interface TreePassThroughOptions<T = any> {
/**
* Used to pass attributes to the checkbox's DOM element.
*/
nodeCheckbox?: TreePassThroughOptionType<T>;
pcNodeCheckbox?: TreePassThroughOptionType<T>;
/**
* Used to pass attributes to the node icon's DOM element.
*/

View File

@ -28,7 +28,17 @@
<component v-else :is="node.collapsedIcon ? 'span' : 'ChevronRightIcon'" :class="cx('nodeToggleIcon')" v-bind="getPTOptions('nodeToggleIcon')" />
</template>
</button>
<Checkbox v-if="checkboxMode" :modelValue="checked" :binary="true" :indeterminate="partialChecked" :class="cx('nodeCheckbox')" :tabindex="-1" :unstyled="unstyled" :pt="getPTOptions('nodeCheckbox')" :data-p-partialchecked="partialChecked">
<Checkbox
v-if="checkboxMode"
:modelValue="checked"
:binary="true"
:indeterminate="partialChecked"
:class="cx('nodeCheckbox')"
:tabindex="-1"
:unstyled="unstyled"
:pt="getPTOptions('pcNodeCheckbox')"
:data-p-partialchecked="partialChecked"
>
<template #icon="slotProps">
<component v-if="templates['checkboxicon']" :is="templates['checkboxicon']" :checked="slotProps.checked" :partialChecked="partialChecked" :class="slotProps.class" />
</template>