[Visualize] Fix inspector download filename issue when saving in-place (#72605)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
14144156f6
commit
2d1939b145
1 changed files with 10 additions and 1 deletions
|
@ -157,7 +157,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 || '',
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -215,8 +215,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 || '');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue