Coder Social home page Coder Social logo

Comments (8)

reppners avatar reppners commented on August 30, 2024 1

Second try https://stackblitz.com/edit/ngx-drag-drop-issue-template-9dgxtj?file=src%2Fapp%2Fapp.component.html

from ngx-drag-drop.

reppners avatar reppners commented on August 30, 2024 1

how can i implement nested dropzones. I have been trying it for last few days did a lot of research but couldn't find a solution and i have to use ngx-drag-drop only. Please help. Thanks

Did you take a look at the nested example?

https://reppners.github.io/ngx-drag-drop/
https://github.com/reppners/ngx-drag-drop/tree/master/demo/app/nested

Here is stackblitz where its as simple as just nesting divs that have the dndDropzone directive
https://stackblitz.com/edit/ngx-drag-drop-issue-template-8t7imw?file=src%2Fapp%2Fapp.component.html

from ngx-drag-drop.

reppners avatar reppners commented on August 30, 2024 1

Closing as answered question.

from ngx-drag-drop.

reppners avatar reppners commented on August 30, 2024

Does this help you as a starting point?
https://stackblitz.com/edit/ngx-drag-drop-issue-template-9dgxtj?file=src%2Fapp%2Fapp.component.html

from ngx-drag-drop.

Keksdroid avatar Keksdroid commented on August 30, 2024

Hey, thanks for this example.
Unfortunately, expanding directories inside the list is not allowed. The listitem itself should become a dropzone on dragover.

from ngx-drag-drop.

Keksdroid avatar Keksdroid commented on August 30, 2024

Exactly what I was looking for! Thanks a lot! It works in my project.
Just two minor problem:

  1. If there is an directory at the top of the list, I'm unable to drop a file above it. You can reproduce it in your example. If there is a file at the first index, everything is fine. I already tried some workaround with padding or margin, but nothing worked. Same problem if I want two drop a file between two folders.
  2. My console is full with "cannot read property 'removeChild' of null, at ...DndDropzoneDirective.cleanupDragoverState and .DndDropzoneDirective.onDragLeave" while dragging. Any idea what could cause this?

I also had a kinda hard time to make this work inside a table instead of div's. It works, but is a pretty ugly way with ng-container and div between tbody and tr. If you have any tips for a clean way inside a table, I would aprreciate it. Every tr is a draggable (and dropable if it is a directory).

from ngx-drag-drop.

reppners avatar reppners commented on August 30, 2024

My console is full with "cannot read property 'removeChild' of null, at ...DndDropzoneDirective.cleanupDragoverState and .DndDropzoneDirective.onDragLeave" while dragging. Any idea what could cause this?

Can you reproduce these console messages based on the stackblitz?

If there is an directory at the top of the list, I'm unable to drop a file above it. You can reproduce it in your example. If there is a file at the first index, everything is fine. I already tried some workaround with padding or margin, but nothing worked. Same problem if I want two drop a file between two folders.

I was able to workaround this with some padding - but when using tables this is not possible anymore. I've too struggled to get it right with tables and haven't really gotten to a solution I would be happy with.

You can check it out anyway https://stackblitz.com/edit/ngx-drag-drop-issue-template-9dgxtj?file=src%2Fapp%2Fapp.component.html

Do you absolutely need to use table markup?

from ngx-drag-drop.

sharmatushar04 avatar sharmatushar04 commented on August 30, 2024

how can i implement nested dropzones. I have been trying it for last few days did a lot of research but couldn't find a solution and i have to use ngx-drag-drop only. Please help. Thanks

from ngx-drag-drop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.