gpt4 book ai didi

vmware-clarity - 条件清晰度数据网格可扩展行

转载 作者:行者123 更新时间:2023-12-02 15:01:39 25 4
gpt4 key购买 nike

我的数据模型是一个包含多行的矩阵,其中一些行包含我想使用 Clarity Datagrid Expandable Rows 显示的详细信息。这是我正在尝试构建的简单版本:

<clr-datagrid>
<clr-dg-column>Artifact</clr-dg-column>
<clr-dg-column>Category</clr-dg-column>
<clr-dg-row>
<clr-dg-cell>AAA</clr-dg-cell>
<clr-dg-cell>111</clr-dg-cell>
<ng-container *ngIf="true">
<clr-dg-row-detail *clrIfExpanded>
<clr-dg-cell>BBB</clr-dg-cell>
<clr-dg-cell>222</clr-dg-cell>
</clr-dg-row-detail>
</ng-container>
</clr-dg-row>
<clr-dg-row>
<clr-dg-cell>CCC</clr-dg-cell>
<clr-dg-cell>333</clr-dg-cell>
</clr-dg-row>
</clr-datagrid>

我期待看到类似下面的内容:

enter image description here

不幸的是,这是我得到的结果:

enter image description here

当我用任何元素(例如 divng-container 等)包裹 clr-dg-row-detail 时会发生此问题.我需要一个 wrap 元素来放置条件表达式,因为并非每一行都有详细信息。

有人建议这样做吗?

最佳答案

您需要使用 ngProjectAs,它没有记录在案,因此除了询问之外您无能为力。这是它的样子:

<ng-container ngProjectAs="clr-dg-row-detail" *ngIf="true">
<clr-dg-row-detail *clrIfExpanded>
<clr-dg-cell>BBB</clr-dg-cell>
<clr-dg-cell>222</clr-dg-cell>
</clr-dg-row-detail>
</ng-container>

关于vmware-clarity - 条件清晰度数据网格可扩展行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49074726/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com