Skip to content

Table: support tree structure data #14632

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

Merged
merged 10 commits into from
Mar 27, 2019
Merged

Table: support tree structure data #14632

merged 10 commits into from
Mar 27, 2019

Conversation

ziyoung
Copy link
Contributor

@ziyoung ziyoung commented Mar 8, 2019

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@ziyoung
Copy link
Contributor Author

ziyoung commented Mar 8, 2019

DONNE

  • 支持异步加载数据
  • 样式调整
  • 文档完善
  • d.ts 文件
  • 单元测试

一个稍微复杂一点的例子:https://jsfiddle.net/2pca45y1/

@element-bot
Copy link
Member

element-bot commented Mar 8, 2019

Deploy preview for element ready!

Built with commit c31fba6

https://deploy-preview-14632--element.netlify.com

@ziyoung ziyoung changed the title [WIP]Table: support TreeTable Table: support TreeTable Mar 14, 2019
@ziyoung ziyoung added this to the 2.7.0 milestone Mar 25, 2019
@ziyoung ziyoung changed the title Table: support TreeTable Table: support tree structure data Mar 27, 2019
@iamkun iamkun merged commit 9def85b into ElemeFE:dev Mar 27, 2019
@Wizzercn
Copy link

good,原来的treetable都是自己扩展实现的,现在好了

@sds0917
Copy link

sds0917 commented Mar 28, 2019

自己扩展了一个treetable,现在官方终于支持了。nice

@lengbing95
Copy link

终于等到这个支持了,不说了,改之前项目实现方法去。。。

@Wizzercn
Copy link

good,原来的treetable都是自己扩展实现的,现在好了

Wizzercn/NutzWk@51f07d1

@sds0917
Copy link

sds0917 commented Mar 28, 2019

good,原来的treetable都是自己扩展实现的,现在好了

Wizzercn/NutzWk@51f07d1

还有问题呢,不过常规使用的话不影响。

@DawnChy
Copy link

DawnChy commented Mar 28, 2019

el-table__row--level-1 在隐藏的时候,index序号显示不对,只能在展开/关闭的时候增/删数据才能显示正常

@yefz
Copy link

yefz commented Mar 28, 2019

支持懒加载,正是需要的,如果把渲染方法抛出来就好了(可以定制图标)

@ziyoung ziyoung deleted the tree-table branch March 28, 2019 09:27
@kotapeter
Copy link

Guys, please use english, would be more readable 😄
btw. I love this feature! 🚀 🥇

@Wizzercn
Copy link

Guys, please use english, would be more readable 😄
btw. I love this feature! 🚀 🥇

Waiting for a long time😄😄

@lshz0088
Copy link

昨天浪费了整整一天找treegrid。。后来没有合适的,自己千辛万苦基于tree改了一个。今天居然就更新了:joy:

@JACK-YUNS
Copy link

可以支持3-4级吗

@amwyyyy
Copy link

amwyyyy commented Mar 29, 2019

终于支持了,之前都是基于 展开行的table 修改了。

@xiaogaofudao
Copy link

默认全部展开, 有bug 啊

#14904

@ziyoung
Copy link
Contributor Author

ziyoung commented Apr 1, 2019

el-table__row--level-1 在隐藏的时候,index序号显示不对,只能在展开/关闭的时候增/删数据才能显示正常

是 bug 吗?提供个 demo 吧。

@ziyoung
Copy link
Contributor Author

ziyoung commented Apr 2, 2019

默认全部展开, 有bug 啊

#14904

不算是这个 pr 引入的 bug。default-expand-all 属性是控制展开行显示的。https://jsfiddle.net/ynb80kc2/

@ansonhorse
Copy link

@ziyoung 请问一下,目前可以设置默认展开么?

2 similar comments
@duanhe1986
Copy link

@ziyoung 请问一下,目前可以设置默认展开么?

@xiaogaofudao
Copy link

@ziyoung 请问一下,目前可以设置默认展开么?

@jwf1173
Copy link

jwf1173 commented Apr 8, 2019

请问下 2.7.0版本的树形表格怎么更换展开关闭的图标呢

@duanhe1986
Copy link

请问下 2.7.0版本的树形表格怎么更换展开关闭的图标呢

更改 .el-icon-arrow-right:before

@jwf1173
Copy link

jwf1173 commented Apr 8, 2019

请问怎么设置默认展开

@ziyoung
Copy link
Contributor Author

ziyoung commented Apr 8, 2019

目前不支持树结构数据table的展开。

@PYPARA
Copy link

PYPARA commented Apr 9, 2019

@ziyoung 当给table设置一个height的时候,如果展开后表格超过了这个height(不展开的时候没超过),滚动异常,无法滚动。

如果不展开的时候,已经超过height,滚动一直存在就是正常的

@languanghao
Copy link

@ziyoung 是不是应该给一个开关啊,有时候是给table一个树形的数据,但是不希望长成树形表格啊

@eljefedelrodeodeljefe
Copy link

While this is a nice feature it can unintentionally break a lot of consumers. E.g. we have production product data that has a a "children" property and since "row-id" is not implemented it will break that table very harshly.

My suggestion is to add a toggle on <el-table>-level to disable it altogether.

@ielgnod
Copy link

ielgnod commented May 9, 2019

支持数据属性字段配置么,就像tree组件的props属性可配置一样? @ziyoung

@huhonggit
Copy link

如何才能默认展开。 如果能设置默认展开多少级 就好了。

@huhonggit
Copy link

@ziyoung 能支持默认展开 能够配置默认展开深度 最好

@ziyoung
Copy link
Contributor Author

ziyoung commented May 24, 2019

展开的功能以及配置功能完善 #15709

weisiren168 pushed a commit to weisiren168/element that referenced this pull request Jun 20, 2019
@isyoungxl
Copy link

请问懒加载如何实现增删改并且维持现有的展开状态,且将数据添加进去呢? @ziyoung 大佬请指教

lzq4047 pushed a commit to lzq4047/element that referenced this pull request May 22, 2020
@TimZw
Copy link

TimZw commented Mar 19, 2021

@ziyoung 您好,请问带复选框的树形表格如何默认勾选呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.