我正在使用 react-dragula 拖放卡片。我需要在拖动后保存它。拖放后我应该如何保存卡片位置?
这就是功能。
const dragDropRow1 = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
Dragula([componentBackingInstance], options);
console.log("find1", options)
console.log("find2", componentBackingInstance)
console.log("find3", dragDropRow1)
}
};
这就是我在正文中使用该功能的方式。
<Grid container ref={dragDropRow1} spacing={2} className="dragdrop-container">
这是我在体内使用的卡片。
< 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>