Ng-zorro-antd: nzDataSource support IterableIterator?

Created on 2 Feb 2018  ·  1Comment  ·  Source: NG-ZORRO/ng-zorro-antd

What problem does this feature solve?

支持传入实现了IterableIterator的数据源

support passing datasource which implements IterableIterator.

What does the proposed API look like?

@Component({
  selector: 'nz-demo-table-basic',
  template: `<nz-table #nzTable [nzDataSource]="data" [nzPageSize]="10"> ...`
})
export class NzDemoTableBasicComponent {
    data = generator(0);

    *generator(i) {
        while(i < 3) { yield i ;}
    }
}
Table 💪 Enhancement

Most helpful comment

I've built my own DataSource to interact with the NzTableComponent, but native support, especially with virtual scroll, would be totally awesome!

>All comments

I've built my own DataSource to interact with the NzTableComponent, but native support, especially with virtual scroll, would be totally awesome!

Was this page helpful?
0 / 5 - 0 ratings