Skip to content

Commit

Permalink
🐛 Pick the title from the params rather than the vis
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Jul 14, 2020
1 parent deea1c8 commit 60b02e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/plugins/vis_type_table/public/vis_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ export function getTableVisualizationControllerClass(
//
// In case some prop is missing check into the top of the chain if they are available and check
// the list above that it is passing through

this.$scope.vis = this.vis;
this.$scope.visState = { params: visParams, title: this.vis.title };
this.$scope.visState = { params: visParams, title: visParams.title };
this.$scope.esResponse = esResponse;

this.$scope.visParams = visParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class VisualizationChart extends React.Component<VisualizationChartProps> {
// has been initialized
throw new Error('Visualization implementation was not initialized on first render.');
}

return this.visualization.render(visData, visParams);
// 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 });
})
);

Expand Down

0 comments on commit 60b02e3

Please sign in to comment.