3

I was trying to use the virtual scroll option for a table with large data size. when I used just it shows correctly with scroll bar. But Since want to enable search i have used "table datatable". but it is not showing search results correctly. How to solve the problem?

<cdk-virtual-scroll-viewport [itemSize] = "20">
        <table datatable >    <<====ISSUE IS HERE ====>>
          <thead> 
            <tr>
              <th> Template </th>
              <th> Details </th>
            </tr>
          </thead>
          <tbody>
            <tr *cdkVirtualFor="let template of templates; let i=index">
              <td >{{ template.name}}</td>
              <td>
                <td >{{ template.details}}</td>
              </td>
            </tr>
          </tbody>
        </table>
      </cdk-virtual-scroll-viewport> 
Raghu Vallikkat
  • 365
  • 5
  • 16
  • 2
    https://stackblitz.com/edit/nahgrin-virtual-scroll-table This is an example of virtual scroll + mat-table. May it help You. – PierreD Dec 30 '19 at 12:31

0 Answers0