webscript component viewer

This commit is contained in:
Eugenio Romano
2016-07-16 22:32:16 +01:00
parent 68bc0c7949
commit 4f3467e7a5
36 changed files with 1655 additions and 9 deletions

View File

@@ -32,6 +32,25 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
private _rows: DataRow[];
private _columns: DataColumn[];
static generationSchema(rowToExaminate: any) {
let schema = [];
if (typeof rowToExaminate === 'object') {
for (let key in rowToExaminate) {
if (rowToExaminate.hasOwnProperty(key)) {
schema.push({
type: 'text',
key: key,
title: key,
sortable: false
});
}
}
}
return schema;
}
constructor(data: any[], schema: DataColumn[]) {
this._rows = [];
this._columns = [];