Skip to content

Commit

Permalink
[7.9] [Visualize] Fix inspector download filename issue when saving i…
Browse files Browse the repository at this point in the history
…n-place (#72605) (#73923)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
dej611 and elasticmachine authored Sep 2, 2020
1 parent 3b730fb commit 6dd1d45
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut
if (!adapters) return;

return this.deps.start().plugins.inspector.open(adapters, {
title: this.getTitle() || '',
title: this.getTitle() || this.title || '',
});
};

Expand Down Expand Up @@ -208,8 +208,17 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut
dirty = true;
}

// propagate the title to the output embeddable
// but only when the visualization is in edit/Visualize mode
if (!this.parent && this.vis.title !== this.output.title) {
this.updateOutput({ title: this.vis.title });
}

// Keep title depending on the output Embeddable to decouple the
// visual appearance of the title and the actual title content (useful in Dashboard)
if (this.output.title !== this.title) {
this.title = this.output.title;

if (this.domNode) {
this.domNode.setAttribute('data-title', this.title || '');
}
Expand Down

0 comments on commit 6dd1d45

Please sign in to comment.