我在我的应用程序中使用了mat-selection-list和超过100个带有复选框的选项,它在chrome,火狐和edge中工作,但在IE11中它非常慢并且挂起。
以下是示例代码:
<mat-selection-list #options [(ngModel)]="selectOptions" [compareWith]="compareFunction" (selectionChange)="onOptionSel($event)">
<mat-list-option *ngFor="let cio of ciOptions" checkboxPosition="before" [value]="cio" aria-label="cio">
{{cio.label}}
发布于 2020-05-27 18:12:09
在尝试*cdkVirtualFor而不是*ngFor之后,它对我起作用了。
https://stackoverflow.com/questions/62006360
复制相似问题