Fixed selected class

This commit is contained in:
Adina Țeudan 2021-12-02 00:47:54 +02:00
parent 11b82af88e
commit 2d2cd9fcda

View File

@ -32,7 +32,9 @@
cdkDropList cdkDropListSortingDisabled>
<div (cdkDragEnded)="stopDragging()" (cdkDragStarted)="startDragging(column)"
(click)="selectionColumn === column && listingService.select(entity)"
*ngFor="let entity of (column.entities | async)" [cdkDragData]="entity" [ngClass]="getItemClasses(entity)" cdkDrag
*ngFor="let entity of (column.entities | async)" [cdkDragData]="entity"
[class.selected]="listingService.isSelected$(entity) | async"
[ngClass]="getItemClasses(entity)" cdkDrag
>
<div *cdkDragPlaceholder [style.min-height]="itemHeight + 'px'"></div>
<ng-container *ngTemplateOutlet="itemTemplate; context: { entity: entity, itemWidth: itemWidth }"></ng-container>