Tree - different name for children

UI Components for Vue
Post Reply
xvadimxt
Posts: 6
Joined: 15 Feb 2021, 15:28

06 May 2021, 09:32

Hi,
Is someone knows how to tell primevue a different children property name.
My children not called children.
it's called marks.

myObject: {
name: "test",
marks: []
}

https://primefaces.org/primevue/showcase/#/tree

This is what i need to tell prime vue tree

Code: Select all

data() {
      return {
        props: {
          label: 'name',
          children: 'marks'
        },
Is there an option like that ?

Code: Select all

<Tree :props="props" />
How can i do it ?

tugce.kucukoglu
Posts: 121
Joined: 23 Oct 2020, 09:28

07 May 2021, 08:25

Hi,

You can use

Code: Select all

<Tree :value="props" />

xvadimxt
Posts: 6
Joined: 15 Feb 2021, 15:28

07 May 2021, 21:52

Code: Select all

<Tree :value="props" />
this is the data you would like to pass to the Tree.
I would like to tell the tree that the data inside :value="myData"
children will be friends and now children

myData: [
person: {
name: "sdsd",
friends [] // instead of children
}
]

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests