22 lines
477 B
TypeScript
22 lines
477 B
TypeScript
import { DataSource } from '@angular/cdk/collections';
|
|
import { Observable } from 'rxjs';
|
|
|
|
export class BillsDataSource extends DataSource<any> {
|
|
|
|
constructor(private data: Observable<any[]>
|
|
) {
|
|
super();
|
|
}
|
|
|
|
connect(): Observable<any[]> {
|
|
return this.data;
|
|
}
|
|
|
|
/**
|
|
* Called when the table is being destroyed. Use this function, to clean up
|
|
* any open connections or free any held resources that were set up during connect.
|
|
*/
|
|
disconnect() {
|
|
}
|
|
}
|