start of toggle to switch between devices and folders data table

This commit is contained in:
Jesse Lucas
2020-03-11 21:24:02 -04:00
parent 1d249a877e
commit 031fd72dfd
11 changed files with 83 additions and 7 deletions
+8 -1
View File
@@ -2,10 +2,12 @@ import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTable } from '@angular/material/table';
import { StatusListFolderDataSource } from './status-list-folder-datasource';
import { Folder } from '../folder';
import { SystemConfigService } from '../system-config.service';
@Component({
selector: 'app-status-list',
templateUrl: './status-list.component.html',
@@ -23,7 +25,12 @@ export class StatusListComponent implements AfterViewInit, OnInit {
constructor(private systemConfigService: SystemConfigService) { };
ngOnInit() {
this.dataSource = new StatusListFolderDataSource(this.systemConfigService);
this.dataSource = new StatusListFolderDataSource();
this.systemConfigService.getDevices().subscribe(
data => {
this.dataSource.data = data;
}
);
}
ngAfterViewInit() {