如何在React JS中垂直和水平拖动?
我是React js的新手,我需要在同一情况下垂直和水平拖放列表,我使用了 react-beautiful-dnd ,但是这个库一次仅支持一个方向,因此,我有什么办法可以同时拖放水平和垂直,
假设我需要将item9拖动到item7位置,那么如果我将item9拖动到item7中,那么它的行为是错误的,正确的行为是item7位置将用item9填充
任何帮助。
注意:我不想使用溢出:自动显示光标
I am new to react JS , I need to drag and drop the list vertically and horizontally at the same it , I have used react-beautiful-dnd , but this library only support one direction at a time , so is there any way I can drag and drop horizontal and vertically at same time ,
Here is the link https://codesandbox.io/s/react-beautiful-dnd-horizontal-list-forked-1xijl8?file=/index.js
In this Suppose I need to drag Item9 to Item7 position , then If I drag Item9 over to Item7 then it behave wrong , correct behavior is Item7 position will be filled with Item9
Any help will be apricated.
NOTE : I don't want to use overflow : auto to show cursor , If Items are more then these should be start from next line rather showing scroller
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论