From fc9edc7baba119c8cbfd6600e79a7b24fd220df0 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Sun, 7 Aug 2022 23:49:29 +0100 Subject: [PATCH] Update CascadeSelectDoc.vue --- src/views/cascadeselect/CascadeSelectDoc.vue | 373 ++++++++++++------- 1 file changed, 242 insertions(+), 131 deletions(-) diff --git a/src/views/cascadeselect/CascadeSelectDoc.vue b/src/views/cascadeselect/CascadeSelectDoc.vue index da12a4aec..6f30ea0a9 100644 --- a/src/views/cascadeselect/CascadeSelectDoc.vue +++ b/src/views/cascadeselect/CascadeSelectDoc.vue @@ -17,9 +17,9 @@ import CascadeSelect from 'primevue/cascadeselect';

CascadeSelect requires a value to bind and a collection of arbitrary objects with a nested hierarchy. optionGroupLabel is used for the text of a category and optionGroupChildren is to define the children of the category. Note that order of the optionGroupChildren matters and it should correspond to the data hierarchy.

- +

-<CascadeSelect v-model="selectedCity" :options="countries" optionLabel="cname" optionGroupLabel="name" 
+<CascadeSelect v-model="selectedCity" :options="countries" optionLabel="cname" optionGroupLabel="name"
                         :optionGroupChildren="['states', 'cities']" style="minWidth: 14rem" >
 
 
@@ -48,11 +48,11 @@ data() { {cname: 'Townsville', code: 'A-TO'} ] }, - + ] }, { - name: 'Canada', + name: 'Canada', code: 'CA', states: [ { @@ -69,7 +69,7 @@ data() { {cname: 'Toronto', code: 'C-TO'} ] }, - + ] }, { @@ -113,7 +113,7 @@ data() {

Content of an item can be customized with the option template.