amsik / liquor-tree

Tree component based on Vue.js
MIT License
398 stars 94 forks source link

Extra fields to return on selected #225

Open bajki opened 3 years ago

bajki commented 3 years ago

Hi, how to get more info from selected node.

If i pass data: [{ id: 1 isBatch: false, text:"Example", description:"Example description " }] is there any way to get description field on selected node?

Thanks

Bubalubs commented 3 years ago

Pass in your data like this and then you should be able to reference it using node.data.description

[{
    id: 1
    isBatch: false,
    text: "Example",
    data: {
        description: "Example description"
    }
}]