Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table 能否提供拖拽事件或者开放自定义事件 #4639

Closed
lzwfly opened this issue Jan 18, 2017 · 9 comments · Fixed by react-component/table#171
Closed

Table 能否提供拖拽事件或者开放自定义事件 #4639

lzwfly opened this issue Jan 18, 2017 · 9 comments · Fixed by react-component/table#171
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@lzwfly
Copy link

lzwfly commented Jan 18, 2017

   尝试使用React-Dnd与Table结合, 让Table支持拖拽, 目前能够使用的row事件太少, 感觉很难融合进去. 不知道大家有木有这样的需要.. 
  或者如果能提供一个table与React-dnd融合的dmeo也是很好的
@ligang01
Copy link

楼上说的对,现在网上资料太少希望大神提供一个简单的demo让我们学习一下。

@jokemmy
Copy link

jokemmy commented Jan 20, 2017

https://motion.ant.design/exhibition/demo/table-enter-leave 中有个参数可以利用 getBodyWrapper

@afc163
Copy link
Member

afc163 commented Jan 21, 2017

对行进行二次封装,可以先参考这个例子:http://react-component.github.io/table/examples/animation.html

拖拽的例子,antd 不会原生支持。后续有时间会补一个例子到 rc-table 上,也非常欢迎尝试并 PR 这个 demo 到 http://github.com/react-component/table

@afc163 afc163 added Enhancement help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. labels Jan 21, 2017
@wufeng87
Copy link

请问getBodyWrapper接口不打算暴露到antd Table吗?

@afc163
Copy link
Member

afc163 commented Mar 16, 2017

@wufeng87 可以用,高级用法 API 里暂时不写,保持简单。

@yesmeck
Copy link
Member

yesmeck commented Jun 23, 2017

See these examples react-component/table#83 (comment)

@benjycui
Copy link
Contributor

@yesmeck 把那个例子更新到 rc-table 的 demo 里面?然后这个 issue 就关了?毕竟不准备暴露到 antd 这层。

@raisezhang
Copy link

@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
Copy link
Member

hengkx commented Aug 8, 2018

请教下 树形数据的表格,可以实现拖拽吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants