Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 561
david valentino Avatar asked Nov 04 '18 04:11

david valentino


1 Answers

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

<cdk-virtual-scroll-viewport>
    <table>
    </table>
</cdk-virtual-scroll-viewport>
like image 73
david valentino Avatar answered Sep 26 '22 08:09

david valentino