Implement ITableService
This commit is contained in:
Родитель
1426368f52
Коммит
d2cc5ac591
|
@ -2,7 +2,7 @@ import { Component, Input, OnChanges, SimpleChanges, OnInit } from '@angular/cor
|
|||
import { InteractiveDocumentViewService } from './interactive-document-view.service';
|
||||
import { InteractiveDocumentService } from './interactive-document.service';
|
||||
import { ViewModel, IViews, IView, Resource } from '../interfaces';
|
||||
import { PostMessageHostServer, EchoServiceName, TableServiceName, ITableService, ITable } from '../api/index';
|
||||
import { PostMessageHostServer, EchoServiceName, TableServiceName, ITableService, ITable, ITableListener } from '../api/index';
|
||||
import * as services from '../services/index';
|
||||
import {
|
||||
Angular2DataTableModule,
|
||||
|
@ -21,6 +21,7 @@ class Table implements ITable {
|
|||
options: TableOptions;
|
||||
rows: any[];
|
||||
selections: any[] = [];
|
||||
private _listeners: ITableListener[] = [];
|
||||
|
||||
loadData(columns: string[], rows: any[]): Promise<void> {
|
||||
console.log('load data');
|
||||
|
@ -44,6 +45,11 @@ class Table implements ITable {
|
|||
console.log('something was selected');
|
||||
console.log(JSON.stringify(event));
|
||||
}
|
||||
|
||||
addListener(listener: ITableListener): Promise<void> {
|
||||
this._listeners.push(listener);
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
class TableService implements ITableService {
|
||||
|
|
Загрузка…
Ссылка в новой задаче