17 lines
430 B
TypeScript
17 lines
430 B
TypeScript
import { DataSource } from '@angular/cdk/collections';
|
|
import { Observable, of as observableOf } from 'rxjs';
|
|
|
|
import { DiscountReportItem } from './discount-report-item';
|
|
|
|
export class DiscountReportDataSource extends DataSource<DiscountReportItem> {
|
|
constructor(public data: DiscountReportItem[]) {
|
|
super();
|
|
}
|
|
|
|
connect(): Observable<DiscountReportItem[]> {
|
|
return observableOf(this.data);
|
|
}
|
|
|
|
disconnect() {}
|
|
}
|