小编Jon*_*Moy的帖子

垫表可扩展行不适用于垫排序 Angular 10

当我对 mat-table 的一列进行排序时,我无法再扩展我的行,只有大约二分之一仍然有效。虽然在没有排序的情况下一切正常。\n我遇到了这个链接: https: //github.com/angular/components/issues/11990#issuecomment-421075196 \n但这根本不能解决任何问题

\n

组件.html:

\n
            <td mat-cell class="expandable-row" *matCellDef="let element" [attr.colspan]="displayedColumns.length">\n                <div *ngIf="element.codeTicket === expandedSymbol" class="container">\n                    <div class="row">\n                        <div class=" col-md-1"></div>\n                        <div class=" col-md-10">\n                            <mat-card >\n                                <p style="white-space: pre-wrap;"><span class="badge badge-pill badge-light" id="badge">Description :</span>{{element.description}}</p>\n                                <div>\n                                    <mat-chip-list #chipList aria-label="Mots Cl\xc3\xa9s">\n                                        <span class="badge badge-pill badge-light" id="badge">Label :</span>\n                                        <mat-chip *ngFor="let mot of element.motCles" matTooltip="{{mot.categorie.libelle}}"\n                                                  [ngClass]="{\'secondClass\': mot.codeCategorie === 1,\'firstClass\': mot.codeCategorie === 2,\'thirdClass\': mot.codeCategorie === 3,\'quatriemeClass\': mot.codeCategorie === 4,\'cinquiemeClass\': mot.codeCategorie === 5,\'sixiemeClass\': mot.codeCategorie === 6,\'spetiemeClass\': mot.codeCategorie === 7 }">{{mot.libelle}}</mat-chip>\n                                    </mat-chip-list>\n                                </div>\n …
Run Code Online (Sandbox Code Playgroud)

angular-material angular mat-table angular10

5
推荐指数
2
解决办法
2990
查看次数

标签 统计

angular ×1

angular-material ×1

angular10 ×1

mat-table ×1