pickled-dev / smt-tools

A series of tools to assist in playing the Shin Megamai Tensei video game series
0 stars 0 forks source link

add virtual scrolling to table components #70

Open pickled-dev opened 5 months ago

pickled-dev commented 5 months ago

Virtual scrolling is kinda like lazy loading your table. It looks like it improves performance pretty dramatically. Seems like there's a few packages that add the feature:

https://www.npmjs.com/package/@ngx-nova/material-extensions-table-virtual-scroll

pickled-dev commented 5 months ago

So I tried to add this using the following package: https://www.npmjs.com/package/@ngx-nova/material-extensions-table-virtual-scroll?activeTab=readme

I had some trouble with dependencies, he cheerfully doesn't mention it's dependent of a version of rxjs that adds breaking changes to my project, but I got all that sorted.

However I still encountered issues trying to run it. I'm not sure what it was exactly, but he mentions this:

Creating a custom CdkTableVirtualScrollDataHandler is allowed. Just add it to the component's imports array or module, and it will be injected into the virtual-scroll directive. For example, to handle remote data chunks.

So I think the fact that I was using a custom data source meant I needed some extra configuration. But if I'm gonna screw around with the CDK I feel like I might as well just write my own table cause there's so much else I wanna change.