Skip to content

Commit

Permalink
updating new table legacy_response_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Nov 6, 2018
1 parent cc6911a commit b2f7047
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core_plugins/table_vis/public/legacy_response_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ export function splitTable(columns, rows, $parent) {
return [{
$parent,
columns: columns.map(column => ({ title: column.name, ...column })),
rows: rows.map(row => {
rows: rows.map((row, rowIndex) => {
return columns.map(column => {
return new AggConfigResult(column.aggConfig, $parent, row[column.id], row[column.id]);
const aggConfigResult = new AggConfigResult(column.aggConfig, $parent, row[column.id], row[column.id]);
aggConfigResult.rawData = {
table: { columns, rows },
column: columns.findIndex(c => c.id === column.id),
row: rowIndex,
};
return aggConfigResult;
});
})
}];
Expand Down

0 comments on commit b2f7047

Please sign in to comment.