Skip to content

Commit

Permalink
log table data
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Mar 17, 2022
1 parent 497b462 commit dfbaf5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions x-pack/plugins/lens/common/expressions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export * from './datatable';
export * from './xy_chart';

export * from './expression_types';
export { logDataTable } from './expressions_utils';
1 change: 1 addition & 0 deletions x-pack/plugins/lens/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
export * from './api';
export * from './constants';
export * from './types';
export { logDataTable } from './expressions';

// Note: do not import the expression folder here or the page bundle will be bloated with all
// the package
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import type { LensMultiTable } from '../../../../lens/common';
import { logDataTable } from '../../../../lens/common';
import type { ChoroplethChartConfig, ChoroplethChartProps } from './types';
import { RENDERER_ID } from './expression_renderer';

Expand Down Expand Up @@ -56,7 +57,10 @@ export const getExpressionFunction = (): ExpressionFunctionDefinition<
},
},
inputTypes: ['lens_multitable'],
fn(data, args) {
fn(data, args, handlers) {
if (handlers?.inspectorAdapters?.tables) {
logDataTable(handlers.inspectorAdapters.tables, data.tables);
}
return {
type: 'render',
as: RENDERER_ID,
Expand Down

0 comments on commit dfbaf5b

Please sign in to comment.