NzTableComponent should support CDK Datasource
See original GitHub issueWhat problem does this feature solve?
NzTableComponent will be able to support virtual scrolling of unknown size data sources.
Currently, unlike NzListComponent, the table component supports only a static array as input, even for virtual scrolling. This limits the table capabilities, as it uses the Angular CDK virtual scroll viewport, which supports a Datasource implementation natively (@angular/cdk/collections).
Custom solutions do indeed work. However they work poorly, especially in respect to change detection and scrolling behavior.
What does the proposed API look like?
NzTableComponent should accept nzData: T[] | Datasource<T>;.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
ng-zorro/ng-zorro-antd - Gitter
Hello Devs, Can anyone tell me how to implement the searching in Tree Select , The tree nodes are in async loading ....
Read more >Table | Angular Material
The CdkTable is an unopinionated, customizable data-table with a fully-templated API, dynamic columns, and an accessible DOM structure.
Read more >Table | NG-ZORRO - Ant Design
Virtual scrolling combine with cdk scrolling used to display large data, you can get cdkVirtualScrollViewport in NzTableComponent and find more API here.
Read more >Angular Table CDK with remote source - Stack Overflow
I am trying to figure out how to populate my table data source ... The table will only update when * the returned...
Read more >Angular CDK Tables - Medium
This tableDataSource$ will serve as our DataSource input for our Angular CDK ... (dragenter) / (dragend) to support dragging and dropping in your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@lppedd thanks to your efforts! we will check it later
I’m now working on this full-time at work.
I’m battling with, apparently, a change-detection issue, caused by the multiple templates nesting & the
CdkVirtualForOfdirective itself.The view is constantly re-rendered, causing an odd infinite-automatic-scroll behavior.
The only solution seems to be
detaching from change-detection anddetectChangesmanually on scrolling, e.g.Alternatively, the
cdk-virtual-scroll-viewportmust be placed under a non-conditional template (tbc).