ngx-virtual-scroller icon indicating copy to clipboard operation
ngx-virtual-scroller copied to clipboard

How to get a horizontal overflow for a table with virtual scroll in the vertical direction?

Open djaebo opened this issue 5 years ago • 1 comments

I'm using this library for virtual scrolling in angular:

I'm using this with a table. It works well and is doing a great job. The vertical virtual scroll is working perfect.

<virtual-scroller
  #scroll
  [items]="
    items$ | async"
>
<table>
<thead  #header>
<th *ngFor="let head of headers">{{head}} </th>
</thead>

<tbody #container>
<tr *ngFor="let item of scroll.viewPortItems">
<td *ngFor="let head of headers">{{item.text}}</td>
</tr>
</tbody>
</table>

</virtual-scroller>

My current issue is that how can I have a horizontal scrollbar for the table if there is an overflow in the x direction,. What I mean by is that I don't want any virtual scroll in horizontal direction, I do have virtual scroll working in the vertical direction. I just want a regular scrollbar in the horizontal direction when there is an overflow.

Like this:

overflow-x: scroll How can I achieve that?

djaebo avatar Jun 10 '20 17:06 djaebo

I'm looking virtual scroll for table in horizontal direction. Have you found any solution for the vertical direction virtual scroll ?

saurabh47 avatar Dec 08 '20 05:12 saurabh47