1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

Enabling virtual scrolling on the member access report table (#13411)

This commit is contained in:
Tom
2025-03-05 10:34:03 -05:00
committed by GitHub
parent f95ce4e442
commit e058953e7d

View File

@@ -35,7 +35,12 @@
</div> </div>
</ng-container> </ng-container>
<bit-table *ngIf="!(isLoading$ | async)" [dataSource]="dataSource" class="tw-mt-2"> <bit-table-scroll
*ngIf="!(isLoading$ | async)"
[dataSource]="dataSource"
[rowSize]="53"
class="tw-table tw-w-full table-hover table-list"
>
<ng-container header> <ng-container header>
<tr> <tr>
<th bitCell bitSortable="name" default>{{ "members" | i18n }}</th> <th bitCell bitSortable="name" default>{{ "members" | i18n }}</th>
@@ -44,25 +49,23 @@
<th bitCell bitSortable="itemsCount">{{ "items" | i18n }}</th> <th bitCell bitSortable="itemsCount">{{ "items" | i18n }}</th>
</tr> </tr>
</ng-container> </ng-container>
<ng-template body let-rows$> <ng-template bitRowDef let-row>
<tr bitRow *ngFor="let r of rows$ | async"> <td bitCell>
<td bitCell> <div class="tw-flex tw-items-center">
<div class="tw-flex tw-items-center"> <bit-avatar size="small" [text]="row.name" class="tw-mr-3"></bit-avatar>
<bit-avatar size="small" [text]="r.name" class="tw-mr-3"></bit-avatar> <div class="tw-flex tw-flex-col">
<div class="tw-flex tw-flex-col"> <button type="button" bitLink (click)="edit(row)">
<button type="button" bitLink (click)="edit(r)"> {{ row.name }}
{{ r.name }} </button>
</button>
<div class="tw-text-sm tw-mt-1 tw-text-muted"> <div class="tw-text-sm tw-mt-1 tw-text-muted">
{{ r.email }} {{ row.email }}
</div>
</div> </div>
</div> </div>
</td> </div>
<td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ r.groupsCount }}</td> </td>
<td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ r.collectionsCount }}</td> <td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ row.groupsCount }}</td>
<td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ r.itemsCount }}</td> <td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ row.collectionsCount }}</td>
</tr> <td bitCell class="tw-text-muted tw-w-[278px] tw-p-4">{{ row.itemsCount }}</td>
</ng-template> </ng-template>
</bit-table> </bit-table-scroll>