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

NzTable的tree型数据展示 #4322

Closed
jacobearl opened this issue Oct 19, 2019 · 2 comments
Closed

NzTable的tree型数据展示 #4322

jacobearl opened this issue Oct 19, 2019 · 2 comments
Assignees

Comments

@jacobearl
Copy link

What problem does this feature solve?

现在在处理一些拥有父子关系的数据,比如说资源,常常一个资源下又有很多资源,此时想要使用NzTable里的tree型数据展示,但发现ng-zorro-antd的nzTable在这方面的处理比较复杂,并且例子也不太好理解

What does the proposed API look like?

能否像elementui给表格加的 tree-props属性一样, 也给NzTable添加一个类似的属性,用来支持表格数据中children数据的渲染

<nz-table #nzTable [nzData]="dataList"  [tree-props]="{children: 'children', hasChildren: 'hasChildren'}">
</nz-table>
```<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->
@zorro-bot
Copy link

zorro-bot bot commented Oct 19, 2019

Translation of this issue:

NzTable type of tree data show

What problem does this feature solve?

Now in the process some of the data have parent-child relationship, such as lower resource, a resource often have a lot of resources at this time want to use NzTable in the tree-type data display, but found ng-zorro-antd of nzTable process in this regard complicated and not very good example of understanding

What does the proposed API look like?

Can elementui like to tree-props property sheet Giga like, add a similar property to NzTable, tabular data used to support the rendering data in children
 ` <Nz-table #nzTable [nzData] = "dataList" [tree-props] = "{children: 'children', hasChildren: 'hasChildren'}"> </ Nz-table> `

@vthinkxie
Copy link
Member

vthinkxie commented Oct 21, 2019

nz-table 所有的dom结构都是用户可以自由控制的,也就是不通过config 来控制组件渲染,添加这种api 和目前组件设计是直接冲突的,你可以自行封装 nz-table 使用,事实上绝大部分用户也是这样使用的

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

No branches or pull requests

2 participants