I'm using react-dragula to drag and drop cards. I need to save it after dragging it. How should I save the cards position after drag and drop?
This is the function.
const dragDropRow1 = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
Dragula([componentBackingInstance], options);
console.log("find1", options)
console.log("find2", componentBackingInstance)
console.log("find3", dragDropRow1)
}
};
This is how I use the function in the body.
<Grid container ref={dragDropRow1} spacing={2} className="dragdrop-container">
This is the cards I'm using in the body.
< Typography variant = "subtitle1"
component = "h2"
className = "widget-title" > {
getLabel({
module: "frontOfficerDashboard",
label: "opd appointments"
})
} <
/Typography> <
Box className = "widget-table" >
<
Box display = "flex" >
<
Box flexGrow = {
1
} >
<
Typography variant = "body2"
component = "p"
className = "color-primary" > {
getLabel({
module: "frontOfficerDashboard",
label: "today total"
})
} <
/Typography> <
/Box>