Skip to content

bad data emission #405

@karelbyte

Description

@karelbyte

Hello thanks for this great component, I have a question to see if you help me, I am using it so that drag and drop is only between children, but I have a question when I catch the @input event, the data that returns me is always that of the parents, why does this happen? Using in vue tools I see that the event emits the array correctly, but what I receive in the data is only the parent array, I don't know if I explain myself!

<v-draggable-treeview v-model="items" @input="getDataDragg" >
this is the data seen from the vue tools when it emits the imput event, the IDs are 50, 44, 45
[[{"id":50,"category_id":41,"is_parent":false,"name":"Automatic","slug":"automatic","status":true,"position":3,"children":[]},{"id":44,"category_id":41,"is_parent":true,"name":"Motherboard","slug":"motherboard","status":true,"position":1,"children":{"id":45,"category_id":41,"is_parent":true,"name":"Microprocesor","slug":"microprocesor","status":true,"position":2,"children":

getDataDragg(data) {
console.log(data)
},
and it is in the data that I receive in the method when it is issued
[[{"id":43,"category_id":null,"is_parent":true,"name":"Digitals","slug":"digitals","status":true,"position":3,"children"{"id":49,"category_id":null,"is_parent":false,"name":"Others","slug":"others","status":true,"position":1,"children":[]},{"id":41,"category_id":null,"is_parent":true,"name":"Computers","slug":"computers","status":true,"position":2,"children":

that data are the root swims to tell you in some way
What am I doing wrong or how to solve it, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions