Tencent / tdesign-react

A React UI components lib for TDesign.
https://tdesign.tencent.com/react
MIT License
806 stars 313 forks source link

[Table] 限定只允许同级节点拖拽 #1557

Closed moecasts closed 1 year ago

moecasts commented 1 year ago

这个功能解决了什么问题

有些节点之间是有层级结构的,如果允许自由拖拽会导致出错,如下:

- category 1
  - item 1
  - item 2
- category 2
  - item 3
  - item 4

这时候 item 应该只能在 category 下面,目前的拖拽可以任意拖拽。

另外:希望可以配置 category 层级不用拖拽

你建议的方案是什么

每个层级注册到同一个 Sortable.Group。参考:https://sortablejs.github.io/Sortable/#shared-lists

支持配置 row 是否需要拖拽。参考:https://sortablejs.github.io/Sortable/#filter

github-actions[bot] commented 1 year ago

👋 @moecasts,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] commented 1 year ago

♥️ 有劳 @yunfeic @tengcaifeng @Yacent @basecss 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @moecasts 。

github-actions[bot] commented 1 year ago

这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。

github-actions[bot] commented 1 year ago

此 Issue 被自动关闭,因为它自被标记为过时 stale 以来已闲置 7 天。