ng2-dnd
ng2-dnd copied to clipboard
Dragging nested components
[ ] bug report [x] feature request [ ] question about the decisions made in the repository
Are nested components supported? Can a dnd-sortable-container be a decendent of a dnd-sortable element? I have an item component that can contain its own list of items. The first level of items drag fine but any inner ones don't. Have I made a mistake or is this not supported?
- Angular version: 2.3.0
- Browser: all
I got this working quite well in angular 1 - it's proving quite tricky using this library. If anyone makes some progress, please let me know!
#20
I know that this issue is old, but I managed to get something similar working by following the instructions in the example Multi list sortable between containers in the readme. Basically one have to use dropZones
and enable/disable the dragging (dragEnabled
) for the different groups selectively. In my implementation I'm using mouseenter
to enable the dragging in the zone of the nested components while at the same time I'm disabling it for the container (and doing the opposite on mouseleave
).
@iignatov thanks for the info. Whilst important, I had more urgent things to work on, and hadn't yet come back to the DND on my project. I figured it would be something like that, just haven't had the time to try doing that since it's a whole bunch of PT. Thanks for comment though - will try that out.
@iignatov Would you be able to provide more info on how you are setting dragEnabled to true on mouseenter? I suspect via a separate method?