mat-selection-list组件在IE11中非常慢,在其他浏览器中也可以正常工作

问题描述 投票:0回答:2

我在我的应用程序中使用了mat-selection-list,并带有100多个带有复选框的选项,它在chrome,firefox和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}}
angular performance angular-material internet-explorer-11
2个回答
0
投票

您是不是要创建此list with selection

我尝试在IE 11浏览器中对此示例进行测试,并提供了100多个选项,但看起来对我而言效果很好。

enter image description here

我建议您尝试使用官方文档中提到的示例代码进行测试。如果问题仍然存在,请尝试共享示例代码。

它可以帮助我们更好地理解问题。我们将尝试对其进行测试以检查问题。


0
投票

尝试使用* cdkVirtualFor而不是* ngFor后为我工作。

© www.soinside.com 2019 - 2024. All rights reserved.