diff --git a/src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap b/src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap index dac5ea46f836f..dc6571de969f0 100644 --- a/src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap +++ b/src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap @@ -8,7 +8,6 @@ Object { "params": Object { "listenOnChange": true, }, - "title": "My Chart title", "visConfig": Object { "dimensions": Object { "buckets": Array [], @@ -31,6 +30,7 @@ Object { "columnIndex": null, "direction": null, }, + "title": "My Chart title", "totalFunc": "sum", }, "visData": Object { diff --git a/src/plugins/vis_type_table/public/table_vis_fn.ts b/src/plugins/vis_type_table/public/table_vis_fn.ts index f50697749268c..9739a7a284e6c 100644 --- a/src/plugins/vis_type_table/public/table_vis_fn.ts +++ b/src/plugins/vis_type_table/public/table_vis_fn.ts @@ -58,14 +58,13 @@ export const createTableVisFn = (): ExpressionFunctionDefinition< }, }, fn(input, args) { - const { title, ...visConfig } = args.visConfig && JSON.parse(args.visConfig); + const visConfig = args.visConfig && JSON.parse(args.visConfig); const convertedData = tableVisResponseHandler(input, visConfig.dimensions); return { type: 'render', as: 'visualization', value: { - title, visData: convertedData, visType: 'table', visConfig, diff --git a/src/plugins/visualizations/public/components/visualization_chart.tsx b/src/plugins/visualizations/public/components/visualization_chart.tsx index 12082403dcc60..fba0afa89ca53 100644 --- a/src/plugins/visualizations/public/components/visualization_chart.tsx +++ b/src/plugins/visualizations/public/components/visualization_chart.tsx @@ -62,8 +62,8 @@ class VisualizationChart extends React.Component { // has been initialized throw new Error('Visualization implementation was not initialized on first render.'); } - // need to pass the title here again to refresh in case of save in-place or renaming - return this.visualization.render(visData, { ...visParams, title: vis.title }); + + return this.visualization.render(visData, visParams); }) );