尝试使用React-Dnd与Table结合, 让Table支持拖拽, 目前能够使用的row事件太少, 感觉很难融合进去. 不知道大家有木有这样的需要.. 或者如果能提供一个table与React-dnd融合的dmeo也是很好的
Activity
ligang01 commentedon Jan 18, 2017
楼上说的对,现在网上资料太少希望大神提供一个简单的demo让我们学习一下。
jokemmy commentedon Jan 20, 2017
https://motion.ant.design/exhibition/demo/table-enter-leave 中有个参数可以利用
getBodyWrapperafc163 commentedon Jan 21, 2017
对行进行二次封装,可以先参考这个例子:http://react-component.github.io/table/examples/animation.html
拖拽的例子,antd 不会原生支持。后续有时间会补一个例子到 rc-table 上,也非常欢迎尝试并 PR 这个 demo 到 http://github.com/react-component/table 。
wufeng87 commentedon Mar 16, 2017
请问getBodyWrapper接口不打算暴露到antd Table吗?
afc163 commentedon Mar 16, 2017
@wufeng87 可以用,高级用法 API 里暂时不写,保持简单。
yesmeck commentedon Jun 23, 2017
See these examples react-component/table#83 (comment)
benjycui commentedon Jun 26, 2017
@yesmeck 把那个例子更新到 rc-table 的 demo 里面?然后这个 issue 就关了?毕竟不准备暴露到 antd 这层。
raisezhang commentedon Jul 19, 2017
@yesmeck @benjycui 拖拽相关的方案我优化了下, 支持拖拽 Table 的 row 及 column !
Demo:
dragging rows:https://codepen.io/raisezhang/pen/MmjypX
dragging columns:https://codepen.io/raisezhang/pen/MoMoyz
HomePage:https://github.com/raisezhang/react-drag-listview
辛苦看看还有啥问题或者建议, 多谢~
Ref: react-component/table#83 (comment)
hengkx commentedon Aug 8, 2018
请教下 树形数据的表格,可以实现拖拽吗