diff --git a/src/plugins/vis_types/table/public/table_vis_fn.ts b/src/plugins/vis_types/table/public/table_vis_fn.ts index 861923ef5086e..99c8992ff5984 100644 --- a/src/plugins/vis_types/table/public/table_vis_fn.ts +++ b/src/plugins/vis_types/table/public/table_vis_fn.ts @@ -126,6 +126,11 @@ export const createTableVisFn = (): TableExpressionFunctionDefinition => ({ }, fn(input, args, handlers) { const convertedData = tableVisResponseHandler(input, args); + const inspectorData = { + rows: convertedData?.table?.rows ?? input.rows, + columns: convertedData?.table?.columns ?? input.columns, + type: 'datatable', + } as Datatable; if (handlers?.inspectorAdapters?.tables) { const argsTable: Dimension[] = [ @@ -158,7 +163,7 @@ export const createTableVisFn = (): TableExpressionFunctionDefinition => ({ }), ]); } - const logTable = prepareLogTable(input, argsTable); + const logTable = prepareLogTable(inspectorData, argsTable); handlers.inspectorAdapters.tables.logDatatable('default', logTable); } return {