Comments (7)
Hi @phphe
I have two Trees with cross-tree enabled, and I would like one flat, not the other.
I tried to limit depth to 1 on one of the tree with your code but it doesn't work in this context :
from the behavior it seems the depth limit property is applied to each node instead of being applied to each tree.I think a real and easy to use tree prop would be more than welcome !
I will think about it
from vue-draggable-nested-tree.
@kevindesousa I published 2.0.0. I added 2 hooks isNodeDraggable, isNodeDroppable. You can use isNodeDroppable do that. Please check the demo: https://codepen.io/phphe/pen/KRapQm. The fourth tree meets your requirements.
from vue-draggable-nested-tree.
@phphe I'm afraid there is some more work to do, it's possible to exceed the limit by dragging an item with children into another item.
from vue-draggable-nested-tree.
@sdebacker You are right. I havn't any solution now.
from vue-draggable-nested-tree.
@sdebacker @kevindesousa check 2.1.1
example https://github.com/phphe/vue-draggable-nested-tree/blob/master/src/examples/MaxLevel.vue
from vue-draggable-nested-tree.
Codepen of MaxLevel.vue for quick overview.
from vue-draggable-nested-tree.
Hi @phphe
I have two Trees with cross-tree enabled, and I would like one flat, not the other.
I tried to limit depth to 1 on one of the tree with your code but it doesn't work in this context :
from the behavior it seems the depth limit property is applied to each node instead of being applied to each tree.
I think a real and easy to use tree prop would be more than welcome !
from vue-draggable-nested-tree.
Related Issues (20)
- Scroll when dragging nodes at edges HOT 4
- click to get data is not showing all data HOT 1
- Drag ghosts are hidden behind other components when dragging HOT 1
- update data does not update the tree view HOT 2
- Collapse all trees when dragging HOT 1
- 多选情况下的拖拽功能 HOT 1
- Uncaught ReferenceError: regeneratorRuntime is not defined HOT 8
- 'nodeOpenChanged' events cannot be listened
- Get Index or path ? HOT 1
- manual update call to force the tree to refresh HOT 5
- Preventing drop for certain tree nodes HOT 8
- not working drag.. HOT 3
- "TypeError: Cannot read property '_vm' of undefined" HOT 4
- Disable nesting for specific tree HOT 4
- not compatible with corejs@3 ? HOT 7
- how to use `store.pure`another button HOT 2
- Does this support multiple select? Can we select multiple elements and drag-drop? HOT 5
- Helper.js triggering CSP for inline style HOT 2
- Make only parent undraggable HOT 1
- Find replaced node HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-draggable-nested-tree.