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

[Feature Anywhere] Fix bug of charts in view events flyout not fetching vislayers #4443

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 @@ -418,10 +418,12 @@ export class VisualizeEmbeddable
const abortController = this.abortController;

// By waiting for this to complete, this.visLayers will be populated.
// Note we only fetch when in the context of a dashboard - we do not
// show events or have event functionality when in the vis edit view.
const isInDashboard = this.parent?.type === DASHBOARD_CONTAINER_TYPE;
if (isInDashboard) {
// Note we only fetch when in the context of a dashboard or in the view
// events flyout - we do not show events or have event functionality when
// in the vis edit view.
const shouldFetchVisLayers =
this.parent?.type === DASHBOARD_CONTAINER_TYPE || this.visAugmenterConfig?.inFlyout;
if (shouldFetchVisLayers) {
await this.populateVisLayers();
}

Expand Down