How to persist new location information in Shopify Drag & Drop in JavaScript

Viewed 16

I am working on a Shopify draggable card. The drag and drop aspects of it are working fine, but I don't see any info on how to gather the new items' locations and save them to a backend anywhere in the documentation. I want the new locations to persist after a page refresh. Is there no way to do this?

  var containers = document.querySelectorAll(".draggable-zone");
   var swappable = new Swappable.default(containers, {
        draggable: ".draggable",
        handle: ".draggable .draggable-handle",
        mirror: {
            //appendTo: selector,
            appendTo: "body",
            constrainDimensions: true
        }
    });
0 Answers
Related