Skip to content

Commit

Permalink
Fix #6371: Add node and expanded data on nodetoggleicon.
Browse files Browse the repository at this point in the history
Nodetoggleicon slot is used to customize expand / collapse and loading
icon, but when loading mode is set to icon mode and a node is loading,
TreeNode use nodetoggleicon without any props instead of binding node and
expanded.
This commit bind node and expanded props to nodetoggleicon slot when
loading mode is set to icon and node.loading is true.
  • Loading branch information
Mehdi Rande committed Sep 10, 2024
1 parent ba744ca commit 264b30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primevue/src/tree/TreeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<button v-ripple type="button" :class="cx('nodeToggleButton')" @click="toggle" tabindex="-1" v-bind="getPTOptions('nodeToggleButton')">
<template v-if="node.loading && loadingMode === 'icon'">
<!-- TODO: nodetogglericon deprecated since v4.0-->
<component v-if="templates['nodetoggleicon'] || templates['nodetogglericon']" :is="templates['nodetoggleicon'] || templates['nodetogglericon']" :class="cx('nodeToggleIcon')" />
<component v-if="templates['nodetoggleicon'] || templates['nodetogglericon']" :is="templates['nodetoggleicon'] || templates['nodetogglericon']" :node="node" :expanded="expanded" :class="cx('nodeToggleIcon')" />
<SpinnerIcon v-else spin :class="cx('nodetogglericon')" v-bind="ptm('nodeToggleIcon')" />
</template>
<template v-else>
Expand Down

0 comments on commit 264b30c

Please sign in to comment.