33 <p >The <i >type</i > property of an OrganizationChartNode is used to map a template to a node. If it is undefined, the default template is used.</p >
44 </DocSectionText >
55 <div class =" card overflow-x-auto" >
6- <OrganizationChart : value =" data" collapsible >
6+ <OrganizationChart v-model:selectionKeys = " selection " : value =" data" collapsible selectionMode = " single " >
77 <template #country =" slotProps " >
88 <div class =" flex flex-col items-center" >
99 <img :alt =" slotProps.node.label" src =" https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class =" `w-2rem flag flag-${slotProps.node.data}`" />
@@ -70,24 +70,25 @@ export default {
7070 }
7171 ]
7272 },
73+ selection: {},
7374 code: {
7475 basic: `
75- <OrganizationChart : value="data" collapsible>
76+ <OrganizationChart v-model:selectionKeys="selection" : value="data" collapsible selectionMode="single" >
7677 <template #country="slotProps">
7778 <div class="flex flex-col items-center">
7879 <img :alt="slotProps.node.label" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\` w-2rem flag flag-\$ {slotProps.node.data}\` " />
7980 <div class="mt-4 font-medium text-lg">{{ slotProps.node.label }}</div>
8081 </div>
8182 </template>
8283 <template #default="slotProps">
83- <span>{{slotProps.node.data. label}}</span>
84+ <span>{{slotProps.node.label}}</span>
8485 </template>
8586</OrganizationChart>
8687` ,
8788 options: `
8889<template>
8990 <div class="card overflow-x-auto">
90- <OrganizationChart : value="data" collapsible>
91+ <OrganizationChart v-model:selectionKeys="selection" : value="data" collapsible selectionMode="single" >
9192 <template #country="slotProps">
9293 <div class="flex flex-col items-center">
9394 <img :alt="slotProps.node.label" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\` w-2rem flag flag-\$ {slotProps.node.data}\` " />
@@ -152,7 +153,8 @@ export default {
152153 ]
153154 }
154155 ]
155- }
156+ },
157+ selection: {},
156158 };
157159 }
158160};
@@ -161,7 +163,7 @@ export default {
161163 composition: `
162164<template>
163165 <div class="card overflow-x-auto">
164- <OrganizationChart : value="data" collapsible>
166+ <OrganizationChart v-model:selectionKeys="selection" : value="data" collapsible selectionMode="single" >
165167 <template #country="slotProps">
166168 <div class="flex flex-col items-center">
167169 <img :alt="slotProps.node.label" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\` w-2rem flag flag-\$ {slotProps.node.data}\` " />
@@ -178,6 +180,7 @@ export default {
178180<script setup>
179181import { ref } from "vue";
180182
183+ const selection = ref({});
181184const data = ref({
182185 key: '0',
183186 type: 'country',
0 commit comments