Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad data emission #405

Open
karelbyte opened this issue Sep 23, 2020 · 0 comments
Open

bad data emission #405

karelbyte opened this issue Sep 23, 2020 · 0 comments

Comments

@karelbyte
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant