david valentino
david valentino

Reputation: 936

How to use cdk-virtual-scroll-viewport for table tbody

since html parse tr then td, using <cdk-virtual-scroll-viewport>breaks the view is there any cdkVirtualScrollViewport as directive for <tbody>?

<tbody>
<cdk-virtual-scroll-viewport  style="height: 500px; width: 100%;"  itemSize="100"
    <tr [hidden]="data.get_user.name.toLowerCase().indexOf(pupilFilter.name.toLowerCase()) < 0 || (pupilFilter.classValue != '0' && data.get_class.value != pupilFilter.classValue)" appMarkClicked="" *cdkVirtualFor="let data of top.data.branch.get_users_as_pupil; let i = index" >
        <td>{{i + 1}}</td>
    </tr>
</cdk-virtual-scroll-viewport>
</tbody>

Upvotes: 11

Views: 10033

Answers (1)

david valentino
david valentino

Reputation: 936

well, i can put the <cdk-virtual-scroll-viewport before <table>

<cdk-virtual-scroll-viewport>
    <table>
    </table>
</cdk-virtual-scroll-viewport>

Upvotes: 7

Related Questions