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

Make only parent undraggable #98

Open
wdamaral opened this issue Sep 22, 2019 · 1 comment
Open

Make only parent undraggable #98

wdamaral opened this issue Sep 22, 2019 · 1 comment

Comments

@wdamaral
Copy link

Is there any way to make only the parent node undraggable?
I noticed that if I put draggable = false on the parent node, all of its children also become undraggable.

-Parent (draggable = false)

  • Child (draggable = true)
@steeldimon
Copy link

steeldimon commented Sep 24, 2019

i'm release something what you mean, with lazy loading tree
When i'm get root element with children, then set data.draggable = false
After all:
loadChildren(slotProps) { var data = slotProps.data if (!data.children.length) { data.children.forEach(function (child) { axios.get(`http://127.0.0.1:8000/dashboard/object/${child.id}`) .then( function (response) { response.data.open = false // current level = 1 (0) // all child make draggable if (slotProps.vm.level > 0) { response.data.draggable = true } data.children.push(response.data) }) .catch(error => console.log(error)) }); } } }

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

2 participants