Skip to content

Commit

Permalink
Fixed #9437 The up and down arrow key stops working by the table virt…
Browse files Browse the repository at this point in the history
…ualscrolling
  • Loading branch information
yigitfindikli committed Oct 22, 2020
1 parent d3b3fbf commit 55563f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/components/table/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ p-columnfilterformelement > .p-inputtext,
display: none;
}

/* Virtual Scroll*/

cdk-virtual-scroll-viewport {
outline: 0 none;
}

@media screen and (max-width: 40em) {
.p-datatable.p-datatable-responsive .p-datatable-thead > tr > th,
.p-datatable.p-datatable-responsive .p-datatable-tfoot > tr > td {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ export class TableBody implements OnDestroy {
</div>
</ng-container>
<ng-template #virtualScrollTemplate>
<cdk-virtual-scroll-viewport [itemSize]="dt.virtualRowHeight" [style.height]="dt.scrollHeight !== 'flex' ? scrollHeight : undefined"
<cdk-virtual-scroll-viewport [itemSize]="dt.virtualRowHeight" tabindex="0" [style.height]="dt.scrollHeight !== 'flex' ? scrollHeight : undefined"
[minBufferPx]="dt.minBufferPx" [maxBufferPx]="dt.maxBufferPx" (scrolledIndexChange)="onScrollIndexChange($event)" class="p-datatable-virtual-scrollable-body">
<table #scrollTable [class]="dt.tableStyleClass" [ngStyle]="dt.tableStyle">
<ng-container *ngTemplateOutlet="frozen ? dt.frozenColGroupTemplate||dt.colGroupTemplate : dt.colGroupTemplate; context {$implicit: columns}"></ng-container>
Expand Down

0 comments on commit 55563f3

Please sign in to comment.