Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Visualize] Fix inspector download filename issue when saving in-place #72605

Merged
merged 5 commits into from
Jul 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',
});
};

Expand Down Expand Up @@ -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 || '');
}
Expand Down