Я пытаюсь использовать cdk-virtual-scroll внутри mat-autocomplete:
<mat-form-field>
<input type="text" placeholder="Pick one" aria-label="Number" matInput [formControl]="myControl2"
[matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete">
<cdk-virtual-scroll-viewport class="autocomplete-test-viewport" itemSize="50" minBufferPx="500" maxBufferPx="750">
<mat-option *cdkVirtualFor="let option of options" [value]="option" class="autocomplete-item">
{{option}}
</mat-option>
</cdk-virtual-scroll-viewport>
</mat-autocomplete>
However the virtual scroll works irregularly in this setup. I generate 200 options but if i scroll slowly by using the scrollbar down arrow (chrome) it stalls around 14. Similar setup with a mat-select doesn't have this problem.
См. https://stackblitz.com/edit/angular-xv1n2e?file=src/app/app.component.html для всего примера настройки (mat-autocomplete и mat-select с помощью cdk-virtual-scroll).
Есть у кого-нибудь рабочий мат-автозаполнение с помощью cdk-virtual-scroll?