angularjs ng-grid: parent child relations between the rows (hide/show rows)

拈花ヽ惹草 提交于 2019-12-04 11:57:09
lmyers

I added a few fields to the model for id, parentId, and expanded. On ng-click of the toggle row, it calls toggleExpansion to set the expanded state for the row. ng-show determines whether to show a row based on the expanded flag.

I made a Plunker to demonstrate: http://plnkr.co/edit/fOMMXePQhWAF4DOnF3dW?p=preview

Here are some links to related questions. See the caveats about the row height css solution in the second link.

How to get ng-grid to hide certain rows

Angular ng-grid row height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!