Add virtual scrolling for search value selector
Adds virtual scrolling for the search value selector.
This commit is contained in:
parent
5b63809b12
commit
eb98289b84
@ -34,7 +34,9 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-option *ngFor="let selectedItem of getFilteredItems()" [value]="selectedItem.id">
|
<cdk-virtual-scroll-viewport class="vscroll-viewport" minBufferPx="200" maxBufferPx="300" [itemSize]="50">
|
||||||
|
<mat-option *cdkVirtualFor="let selectedItem of getFilteredItems()" [value]="selectedItem.id">
|
||||||
{{ selectedItem.getTitle() | translate }}
|
{{ selectedItem.getTitle() | translate }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
</cdk-virtual-scroll-viewport>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
@ -28,3 +28,8 @@
|
|||||||
display: block;
|
display: block;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vscroll-viewport {
|
||||||
|
height: 200px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user