Drag-Drop list transfer between components by dropping on navigation label of destination componentHow can I drop drag-able items into drop-zone which contains children drop-zones in Ext JS?Angular2 Drag and Drop TargetDrag & Drop - Angular Material 2 Experimental CDK - Reordering Horizontally Stacked ItemsDelete option for the dropped list itemChange order of list items using drag and dropPlace items in between of list using drag and dropAngular 7 Drag and Drop - Dynamically Create Drop Zonesdrag and drop with Angular 7 Material CDKAngular Material Nested Drag and DropAngular CDK drag and drop lists break when their data is re-instantiated

The IT department bottlenecks progress. How should I handle this?

What exact color does ozone gas have?

How to cover method return statement in Apex Class?

What if a revenant (monster) gains fire resistance?

Add big quotation marks inside my colorbox

Unexpected behavior of the procedure `Area` on the object 'Polygon'

On a tidally locked planet, would time be quantized?

PTIJ: Haman's bad computer

Why "had" in "[something] we would have made had we used [something]"?

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

putting logo on same line but after title, latex

When were female captains banned from Starfleet?

Pre-mixing cryogenic fuels and using only one fuel tank

Why Shazam when there is already Superman?

Plot of a tornado-shaped surface

How to hide some fields of struct in C?

Quasinilpotent , non-compact operators

creating a ":KeepCursor" command

Can a Canadian Travel to the USA twice, less than 180 days each time?

It grows, but water kills it

Is there a RAID 0 Equivalent for RAM?

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Do the primes contain an infinite almost arithmetic progression?

What should you do when eye contact makes your subordinate uncomfortable?



Drag-Drop list transfer between components by dropping on navigation label of destination component


How can I drop drag-able items into drop-zone which contains children drop-zones in Ext JS?Angular2 Drag and Drop TargetDrag & Drop - Angular Material 2 Experimental CDK - Reordering Horizontally Stacked ItemsDelete option for the dropped list itemChange order of list items using drag and dropPlace items in between of list using drag and dropAngular 7 Drag and Drop - Dynamically Create Drop Zonesdrag and drop with Angular 7 Material CDKAngular Material Nested Drag and DropAngular CDK drag and drop lists break when their data is re-instantiated













1















I'm trying to figure out how to drop an element from one list onto a <div> and have that item change lists.



The goal is to be able to drop items from one list onto the labels in a sidebar navigation and have the item be switched to the list on that destination page.



I've attempted implementing a very simple proof of concept on stackblitz, but to no avail.



Is it possible to drop an item to a given div (even one that doesn't display a list) and have that item switch lists?



Here's the link to the stackblitz: https://stackblitz.com/edit/angular-special-drop-zone



In the stackblitz, I'm trying to be able to drop items from the TODO list onto the DONE header and have them added to the DONE list.



EDIT: Here's a GIF of what I'm trying to accomplish. Upon dropping onto 'Backlog' in the side nav, I want it to switch to the backlog list.



enter image description here










share|improve this question




























    1















    I'm trying to figure out how to drop an element from one list onto a <div> and have that item change lists.



    The goal is to be able to drop items from one list onto the labels in a sidebar navigation and have the item be switched to the list on that destination page.



    I've attempted implementing a very simple proof of concept on stackblitz, but to no avail.



    Is it possible to drop an item to a given div (even one that doesn't display a list) and have that item switch lists?



    Here's the link to the stackblitz: https://stackblitz.com/edit/angular-special-drop-zone



    In the stackblitz, I'm trying to be able to drop items from the TODO list onto the DONE header and have them added to the DONE list.



    EDIT: Here's a GIF of what I'm trying to accomplish. Upon dropping onto 'Backlog' in the side nav, I want it to switch to the backlog list.



    enter image description here










    share|improve this question


























      1












      1








      1








      I'm trying to figure out how to drop an element from one list onto a <div> and have that item change lists.



      The goal is to be able to drop items from one list onto the labels in a sidebar navigation and have the item be switched to the list on that destination page.



      I've attempted implementing a very simple proof of concept on stackblitz, but to no avail.



      Is it possible to drop an item to a given div (even one that doesn't display a list) and have that item switch lists?



      Here's the link to the stackblitz: https://stackblitz.com/edit/angular-special-drop-zone



      In the stackblitz, I'm trying to be able to drop items from the TODO list onto the DONE header and have them added to the DONE list.



      EDIT: Here's a GIF of what I'm trying to accomplish. Upon dropping onto 'Backlog' in the side nav, I want it to switch to the backlog list.



      enter image description here










      share|improve this question
















      I'm trying to figure out how to drop an element from one list onto a <div> and have that item change lists.



      The goal is to be able to drop items from one list onto the labels in a sidebar navigation and have the item be switched to the list on that destination page.



      I've attempted implementing a very simple proof of concept on stackblitz, but to no avail.



      Is it possible to drop an item to a given div (even one that doesn't display a list) and have that item switch lists?



      Here's the link to the stackblitz: https://stackblitz.com/edit/angular-special-drop-zone



      In the stackblitz, I'm trying to be able to drop items from the TODO list onto the DONE header and have them added to the DONE list.



      EDIT: Here's a GIF of what I'm trying to accomplish. Upon dropping onto 'Backlog' in the side nav, I want it to switch to the backlog list.



      enter image description here







      angular typescript drag-and-drop angular-cdk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 11 at 17:25







      Trevor

















      asked Mar 8 at 1:47









      TrevorTrevor

      90217




      90217






















          1 Answer
          1






          active

          oldest

          votes


















          0














          TL;DR:



          Add all the cdkDrop* attributes to the div you want to be able to drop on, just don't render the list. Make sure it shares the same cdkDropListdata property that the visible list does. See stackblitz links for examples.




          I've found 2 ways to solve this problem. Both require treating the drop zone <div> as an independent cdkDropList.



          1. Using cdkDropListConnectedTo



          Documentation: https://stackblitz.com/edit/ng-cdkdroplistgroup



          Stackblitz:CdkDropListConnectedTo Example



          Connect the origin list to the invisible 'drop' list (that's just a div/label), using cdkDropListConnectedTo.



          2. Using cdkDropListGroup



          See Documentation



          Stackblitz: CdkDropListGroup Example



          Use the cdkDropListGroup directive on a div that contains all the lists that you want to be able to drag/drop between. They will be automatically connected as if you had used cdkDropListConnectedTo on each of them, with all their unique names.




          To be able to drop on a label and have it end up in a list, follow the same process as above by having the visible list and the label share the same cdkDropListdata property.



          In some cases this isn't possible as the label and the visible list might be in different components and getting their data from a data service or observable. In this case, you'll want to handle the drop event, and update the lists yourself instead of just using transferArrayItem(). If the components have subscribed to changes, the behavior will be the same.






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055590%2fdrag-drop-list-transfer-between-components-by-dropping-on-navigation-label-of-de%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            TL;DR:



            Add all the cdkDrop* attributes to the div you want to be able to drop on, just don't render the list. Make sure it shares the same cdkDropListdata property that the visible list does. See stackblitz links for examples.




            I've found 2 ways to solve this problem. Both require treating the drop zone <div> as an independent cdkDropList.



            1. Using cdkDropListConnectedTo



            Documentation: https://stackblitz.com/edit/ng-cdkdroplistgroup



            Stackblitz:CdkDropListConnectedTo Example



            Connect the origin list to the invisible 'drop' list (that's just a div/label), using cdkDropListConnectedTo.



            2. Using cdkDropListGroup



            See Documentation



            Stackblitz: CdkDropListGroup Example



            Use the cdkDropListGroup directive on a div that contains all the lists that you want to be able to drag/drop between. They will be automatically connected as if you had used cdkDropListConnectedTo on each of them, with all their unique names.




            To be able to drop on a label and have it end up in a list, follow the same process as above by having the visible list and the label share the same cdkDropListdata property.



            In some cases this isn't possible as the label and the visible list might be in different components and getting their data from a data service or observable. In this case, you'll want to handle the drop event, and update the lists yourself instead of just using transferArrayItem(). If the components have subscribed to changes, the behavior will be the same.






            share|improve this answer



























              0














              TL;DR:



              Add all the cdkDrop* attributes to the div you want to be able to drop on, just don't render the list. Make sure it shares the same cdkDropListdata property that the visible list does. See stackblitz links for examples.




              I've found 2 ways to solve this problem. Both require treating the drop zone <div> as an independent cdkDropList.



              1. Using cdkDropListConnectedTo



              Documentation: https://stackblitz.com/edit/ng-cdkdroplistgroup



              Stackblitz:CdkDropListConnectedTo Example



              Connect the origin list to the invisible 'drop' list (that's just a div/label), using cdkDropListConnectedTo.



              2. Using cdkDropListGroup



              See Documentation



              Stackblitz: CdkDropListGroup Example



              Use the cdkDropListGroup directive on a div that contains all the lists that you want to be able to drag/drop between. They will be automatically connected as if you had used cdkDropListConnectedTo on each of them, with all their unique names.




              To be able to drop on a label and have it end up in a list, follow the same process as above by having the visible list and the label share the same cdkDropListdata property.



              In some cases this isn't possible as the label and the visible list might be in different components and getting their data from a data service or observable. In this case, you'll want to handle the drop event, and update the lists yourself instead of just using transferArrayItem(). If the components have subscribed to changes, the behavior will be the same.






              share|improve this answer

























                0












                0








                0







                TL;DR:



                Add all the cdkDrop* attributes to the div you want to be able to drop on, just don't render the list. Make sure it shares the same cdkDropListdata property that the visible list does. See stackblitz links for examples.




                I've found 2 ways to solve this problem. Both require treating the drop zone <div> as an independent cdkDropList.



                1. Using cdkDropListConnectedTo



                Documentation: https://stackblitz.com/edit/ng-cdkdroplistgroup



                Stackblitz:CdkDropListConnectedTo Example



                Connect the origin list to the invisible 'drop' list (that's just a div/label), using cdkDropListConnectedTo.



                2. Using cdkDropListGroup



                See Documentation



                Stackblitz: CdkDropListGroup Example



                Use the cdkDropListGroup directive on a div that contains all the lists that you want to be able to drag/drop between. They will be automatically connected as if you had used cdkDropListConnectedTo on each of them, with all their unique names.




                To be able to drop on a label and have it end up in a list, follow the same process as above by having the visible list and the label share the same cdkDropListdata property.



                In some cases this isn't possible as the label and the visible list might be in different components and getting their data from a data service or observable. In this case, you'll want to handle the drop event, and update the lists yourself instead of just using transferArrayItem(). If the components have subscribed to changes, the behavior will be the same.






                share|improve this answer













                TL;DR:



                Add all the cdkDrop* attributes to the div you want to be able to drop on, just don't render the list. Make sure it shares the same cdkDropListdata property that the visible list does. See stackblitz links for examples.




                I've found 2 ways to solve this problem. Both require treating the drop zone <div> as an independent cdkDropList.



                1. Using cdkDropListConnectedTo



                Documentation: https://stackblitz.com/edit/ng-cdkdroplistgroup



                Stackblitz:CdkDropListConnectedTo Example



                Connect the origin list to the invisible 'drop' list (that's just a div/label), using cdkDropListConnectedTo.



                2. Using cdkDropListGroup



                See Documentation



                Stackblitz: CdkDropListGroup Example



                Use the cdkDropListGroup directive on a div that contains all the lists that you want to be able to drag/drop between. They will be automatically connected as if you had used cdkDropListConnectedTo on each of them, with all their unique names.




                To be able to drop on a label and have it end up in a list, follow the same process as above by having the visible list and the label share the same cdkDropListdata property.



                In some cases this isn't possible as the label and the visible list might be in different components and getting their data from a data service or observable. In this case, you'll want to handle the drop event, and update the lists yourself instead of just using transferArrayItem(). If the components have subscribed to changes, the behavior will be the same.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 12 at 19:56









                TrevorTrevor

                90217




                90217





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055590%2fdrag-drop-list-transfer-between-components-by-dropping-on-navigation-label-of-de%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

                    Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

                    List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229