Last active
April 20, 2022 19:24
-
-
Save kagklis/ba91f0d8dea7b8d8a4417a72d0b5dd6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cdk-virtual-scroll-viewport | |
*ngIf="items?.length" | |
class="selection-list col-lg-7" | |
[itemSize]="74" | |
> | |
<div | |
class="item" | |
[ngClass]="{ selected: selectedItems[item.id] }" | |
*cdkVirtualFor="let item of items" | |
(click)="selectItem(item)" | |
> | |
<input | |
class="form-check-input mt-0 me-2" | |
type="checkbox" | |
[checked]="selectedItems[item.id]" | |
/> | |
<div class="content"> | |
<ng-container | |
[ngTemplateOutlet]="itemTemplateRef" | |
[ngTemplateOutletContext]="{ $implicit: item }" | |
></ng-container> | |
</div> | |
</div> | |
</cdk-virtual-scroll-viewport> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment