AG-GRID:有没有办法让 expand/collapse 功能连续显示并在扩展区域显示自定义内容?

AG-GRID: Is there a way to have expand/collapse functionality on a row and show custom content in the expanded area?

我们需要能够 expand/collapse 单独的行,并在展开时在行下方的区域中显示自定义 (angular) 组件,这些组件将接收一些数据作为输入扩展行。

我们找到的最接近的是企业版的Master/Detail功能,但我们不想显示嵌套的table,我们想要自定义内容。

类似于此this

您可以使用 Master-details 功能。

该功能适用​​于企业许可证。

参考:Example - Custom Detail Cell Renderer

我的树状网格实现基于此: https://riddheshganatra.medium.com/tree-data-with-ag-grid-community-94ba1dfb40eb 与相关的代码仓库在这里: https://github.com/riddheshganatra/ag-grid-tree 我做了一些工作来澄清它的可读性(至少在我看来),以及一些优化(递归搜索 lookup-table)并使事情成为适当的 class 结构以与 ag-grid 文档示例。

https://github.com/nmz787/ag-grid-tree