I try to use the cdk-virtual-scroll inside a 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.
See https://stackblitz.com/edit/angular-xv1n2e?file=src/app/app.component.html for the whole example setup (mat-autocomplete and mat-select with the cdk-virtual-scroll).
Has anyone a working mat-autocomplete with the cdk-virtual-scroll?