DouyinFE / semi-design

🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻‍💻 Design to Code in one click
https://semi.design
Other
8.45k stars 715 forks source link

[Doc] Update Table sortable demo usage #997

Closed pointhalo closed 6 months ago

pointhalo commented 2 years ago

Which Component Need Enhancement

Table

Feature Description 功能描述

Update use table + react-dnd demo image

Additional information 补充说明

shijiatongxue commented 2 years ago

react-dnd@15 hooks 写法支持

pointhalo commented 2 years ago

The dragging example on the official website is based on the old version v9 of react-dnd, which is out of touch with the actual latest version. We need an updated example

shijiatongxue commented 2 years ago

尝试用 reacrt-dnd@15 写了一个 codesandbox,拖拽后的 index 计算有点问题。

需要花点时间重新看下。

问题:任意拖拽一个行,放下,没问题。再反复拖拽其他行,index 对应不上。

https://codesandbox.io/s/semi-draggable-table-react-dnd-3xe3cp?file=/src/App.tsx