admin管理员组文章数量:1303499
I have a simple react-beautiful-dnd app where I have multiple rows, and you can drag ponents within their own rows.
My issue is that when I drag a Draggable within one row, the visual effect of content moving and the Dragged ponent disappearing happens on every row.
Here is a gif demonstrating my issue:
And here is a codesandbox with an interactive demonstration of the issue, with a step-by-step to reproduce the problem:
;hidenavigation=1&theme=dark
I have a simple react-beautiful-dnd app where I have multiple rows, and you can drag ponents within their own rows.
My issue is that when I drag a Draggable within one row, the visual effect of content moving and the Dragged ponent disappearing happens on every row.
Here is a gif demonstrating my issue:
And here is a codesandbox with an interactive demonstration of the issue, with a step-by-step to reproduce the problem:
https://codesandbox.io/s/r-b-d-try-2-wgscc?fontsize=14&hidenavigation=1&theme=dark
Share Improve this question edited Jan 16, 2020 at 19:11 damon asked Jan 16, 2020 at 18:54 damondamon 2,8978 gold badges28 silver badges35 bronze badges1 Answer
Reset to default 8I think your issue is caused by reusing draggable ids. Your ids are currently based on the index of the square. These will be repeated for your different rows. Try moving over to a unique id for each square
See here for more details: https://github./atlassian/react-beautiful-dnd/blob/master/docs/guides/identifiers.md
本文标签:
版权声明:本文标题:javascript - react-beautiful-dnd: When multiple lists exists, dragging content in one row will drag same index from all rows - S 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741745691a2395518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论