17 lines
373 B
TypeScript
17 lines
373 B
TypeScript
import { DataSource } from '@angular/cdk/collections';
|
|
import { Observable, of as observableOf } from 'rxjs';
|
|
|
|
import { Device } from '../../core/device';
|
|
|
|
export class DeviceListDataSource extends DataSource<Device> {
|
|
constructor(public data: Device[]) {
|
|
super();
|
|
}
|
|
|
|
connect(): Observable<Device[]> {
|
|
return observableOf(this.data);
|
|
}
|
|
|
|
disconnect() {}
|
|
}
|