问题描述
我在 react-beautiful-dnd 中使用了函数式组件来实现拖放。 我有来自后端的以下给定格式的数据:
[
{
"module_id": 66,"module_type": "HTML CSS","module_name": "Pre-Reading","duration": 50,"course": {
"course_name": "Full Stack","course_id": 2
}
},{
"module_id": 67,"module_type": "Javascript","duration": 30,{
"module_id": 68,"module_type": "Design a webpage!","module_name": "Lab","course_id": 2
}
}
]
请在此处找到代码
https://codesandBox.io/s/determined-darkness-8hqm9?file
,列表正确呈现,但是当我尝试拖放时,只有拖放有效,而拖放无效。
假设我想将第一个 HTML 和 CSS 移到最后,并将“设计网页”移到第一个,HTML 和 CSS 被拖到底部,但是当我将它放在最后一个时,它又移到了第一个.请帮我纠正我的错误。
提前致谢:)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)